1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-04 14:13:28 +01:00
bitwarden-server/test/Core.Test/SecretsManager/AutoFixture/SecretFixtures.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
612 B
C#
Raw Normal View History

using AutoFixture;
using Bit.Core.SecretsManager.Entities;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.SecretsManager.AutoFixture.SecretsFixture;
public class SecretCustomization : ICustomization
{
public void Customize(IFixture fixture)
{
var secretId = Guid.NewGuid();
fixture.Customize<Secret>(composer => composer
.With(o => o.Id, secretId)
.Without(s => s.Projects));
}
}
public class SecretCustomizeAttribute : BitCustomizeAttribute
{
public override ICustomization GetCustomization() => new SecretCustomization();
}