using FluentAssertions; using FluentAssertions.Primitives; using FluentAssertions.Specialized; using System; using System.Threading.Tasks; namespace Timeline.Tests.Helpers { public static class AsyncFunctionAssertionsExtensions { public static async Task> ThrowAsync(this AsyncFunctionAssertions assertions, Type exceptionType, string because = "", params object[] becauseArgs) { return (await assertions.ThrowAsync(because, becauseArgs)).Which.Should().BeAssignableTo(exceptionType); } } }