mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
4e7b9d2edd
* Extract Import-Api endpoints into separate controller Moved ciphers/import and ciphers/import-organization into new ImportController Paths have been kept intact for now (no changes on clients needed) Moved request-models used for import into tools-subfolder * Update CODEOWNERS for team-tools-dev * Move HibpController (reports) to tools * Moving files related to Send * Moving files related to ReferenceEvent * Removed unneeded newline
22 lines
598 B
C#
22 lines
598 B
C#
using AutoFixture;
|
|
using Bit.Core.Tools.Entities;
|
|
using Bit.Test.Common.AutoFixture.Attributes;
|
|
|
|
namespace Bit.Core.Test.Tools.AutoFixture.SendFixtures;
|
|
|
|
internal class UserSend : ICustomization
|
|
{
|
|
public Guid? UserId { get; set; }
|
|
public void Customize(IFixture fixture)
|
|
{
|
|
fixture.Customize<Send>(composer => composer
|
|
.With(s => s.UserId, UserId ?? Guid.NewGuid())
|
|
.Without(s => s.OrganizationId));
|
|
}
|
|
}
|
|
|
|
internal class UserSendCustomizeAttribute : BitCustomizeAttribute
|
|
{
|
|
public override ICustomization GetCustomization() => new UserSend();
|
|
}
|