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

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

19 lines
615 B
C#
Raw Permalink 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));
}
}