1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
bitwarden-server/test/Core.Test/AutoFixture/SubscriptionInfoCustomization.cs

19 lines
615 B
C#
Raw Normal View History

using AutoFixture;
using Bit.Core.Models.Business;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture;
public class SubscriptionInfoCustomizeAttribute : BitCustomizeAttribute
{
public override ICustomization GetCustomization() => new SubscriptionInfoCustomization();
}
public class SubscriptionInfoCustomization : ICustomization
{
public void Customize(IFixture fixture)
{
// The Subscription property uses the external Stripe library, which Autofixture doesn't handle
fixture.Customize<SubscriptionInfo>(c => c.Without(s => s.Subscription));
}
}