mirror of
https://github.com/bitwarden/server.git
synced 2025-04-07 05:58:13 -05:00

* Revert "Add git blame entry (#2226)" This reverts commit 239286737d15cb84a893703ee5a8b33a2d67ad3d. * Revert "Turn on file scoped namespaces (#2225)" This reverts commit 34fb4cca2aa78deb84d4cbc359992a7c6bba7ea5.
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
using AutoFixture;
|
|
using AutoFixture.Dsl;
|
|
using Bit.Core.Models.Data;
|
|
|
|
namespace Bit.Core.Test.AutoFixture.CipherAttachmentMetaData
|
|
{
|
|
public class MetaData : ICustomization
|
|
{
|
|
protected virtual IPostprocessComposer<CipherAttachment.MetaData> ComposerAction(IFixture fixture,
|
|
ICustomizationComposer<CipherAttachment.MetaData> composer)
|
|
{
|
|
return composer.With(d => d.Size, fixture.Create<long>());
|
|
}
|
|
public void Customize(IFixture fixture)
|
|
{
|
|
fixture.Customize<CipherAttachment.MetaData>(composer => ComposerAction(fixture, composer));
|
|
}
|
|
}
|
|
|
|
public class MetaDataWithoutContainer : MetaData
|
|
{
|
|
protected override IPostprocessComposer<CipherAttachment.MetaData> ComposerAction(IFixture fixture,
|
|
ICustomizationComposer<CipherAttachment.MetaData> composer) =>
|
|
base.ComposerAction(fixture, composer).With(d => d.ContainerName, (string)null);
|
|
}
|
|
|
|
public class MetaDataWithoutKey : MetaDataWithoutContainer
|
|
{
|
|
protected override IPostprocessComposer<CipherAttachment.MetaData> ComposerAction(IFixture fixture,
|
|
ICustomizationComposer<CipherAttachment.MetaData> composer) =>
|
|
base.ComposerAction(fixture, composer).Without(d => d.Key);
|
|
}
|
|
}
|