1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-11 15:17:44 +01:00
bitwarden-server/test/Core.Test/SecretsManager/AutoFixture/SecretFixtures.cs
Oscar Hinton 59f5285c88
[SM-460] Isolate SecretsManager files (#2616)
Move SecretsManager files to directories called SecretsManager and add CodeOwners
2023-01-24 19:57:28 +01:00

23 lines
612 B
C#

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();
}