mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 09:02:48 -05:00
Turn on file scoped namespaces (#2225)
This commit is contained in:
@ -2,32 +2,31 @@
|
||||
using AutoFixture.Dsl;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Core.Test.AutoFixture.CipherAttachmentMetaData
|
||||
namespace Bit.Core.Test.AutoFixture.CipherAttachmentMetaData;
|
||||
|
||||
public class MetaData : ICustomization
|
||||
{
|
||||
public class MetaData : ICustomization
|
||||
protected virtual IPostprocessComposer<CipherAttachment.MetaData> ComposerAction(IFixture fixture,
|
||||
ICustomizationComposer<CipherAttachment.MetaData> composer)
|
||||
{
|
||||
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));
|
||||
}
|
||||
return composer.With(d => d.Size, fixture.Create<long>());
|
||||
}
|
||||
|
||||
public class MetaDataWithoutContainer : MetaData
|
||||
public void Customize(IFixture fixture)
|
||||
{
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user