You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
653 B
22 lines
653 B
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); |
|
} |
|
}
|
|
|