2023-01-13 15:02:53 +01:00
|
|
|
|
using AutoFixture;
|
2023-01-24 19:57:28 +01:00
|
|
|
|
using Bit.Core.SecretsManager.Entities;
|
2023-01-13 15:02:53 +01:00
|
|
|
|
using Bit.Test.Common.AutoFixture.Attributes;
|
|
|
|
|
|
2023-01-24 19:57:28 +01:00
|
|
|
|
namespace Bit.Core.Test.SecretsManager.AutoFixture.ProjectsFixture;
|
2023-01-13 15:02:53 +01:00
|
|
|
|
|
|
|
|
|
public class ProjectCustomization : ICustomization
|
|
|
|
|
{
|
|
|
|
|
public void Customize(IFixture fixture)
|
|
|
|
|
{
|
|
|
|
|
var projectId = Guid.NewGuid();
|
|
|
|
|
|
|
|
|
|
fixture.Customize<Project>(composer => composer
|
|
|
|
|
.With(p => p.Id, projectId)
|
|
|
|
|
.Without(s => s.Secrets));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ProjectCustomizeAttribute : BitCustomizeAttribute
|
|
|
|
|
{
|
|
|
|
|
public override ICustomization GetCustomization() => new ProjectCustomization();
|
|
|
|
|
}
|