using AutoFixture; using AutoFixture.Dsl; using Bit.Core.Models.Data; namespace Bit.Core.Test.AutoFixture.CipherAttachmentMetaData; public class MetaData : ICustomization { protected virtual IPostprocessComposer ComposerAction(IFixture fixture, ICustomizationComposer composer) { return composer.With(d => d.Size, fixture.Create()); } public void Customize(IFixture fixture) { fixture.Customize(composer => ComposerAction(fixture, composer)); } } public class MetaDataWithoutContainer : MetaData { protected override IPostprocessComposer ComposerAction(IFixture fixture, ICustomizationComposer composer) => base.ComposerAction(fixture, composer).With(d => d.ContainerName, (string)null); } public class MetaDataWithoutKey : MetaDataWithoutContainer { protected override IPostprocessComposer ComposerAction(IFixture fixture, ICustomizationComposer composer) => base.ComposerAction(fixture, composer).Without(d => d.Key); }