1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00
bitwarden-server/test/Core.Test/Billing/Utilities.cs

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

23 lines
653 B
C#
Raw Permalink Normal View History

using Bit.Core.Billing;
using Xunit;
namespace Bit.Core.Test.Billing;
public static class Utilities
{
public static async Task ThrowsBillingExceptionAsync(
Func<Task> function,
string response = null,
string message = null,
Exception innerException = null)
{
var expected = new BillingException(response, message, innerException);
var actual = await Assert.ThrowsAsync<BillingException>(function);
Assert.Equal(expected.Response, actual.Response);
Assert.Equal(expected.Message, actual.Message);
Assert.Equal(expected.InnerException, actual.InnerException);
}
}