mirror of
https://github.com/bitwarden/server.git
synced 2024-12-01 13:43:23 +01:00
19 lines
615 B
C#
19 lines
615 B
C#
|
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));
|
|||
|
}
|
|||
|
}
|