public void BeAsyncEnumerable_With_NoInterfaces_Should_NotThrow() { // Arrange var actual = new EmptyAsyncEnumerable <int>(); // Act _ = actual.Must().BeAsyncEnumerableOf <int>(); // Assert }
public void BeAsyncEnumerable_With_WrongCurrent_Should_Throw() { // Arrange var actual = new EmptyAsyncEnumerable <int>(); // Act void action() => actual.Must().BeAsyncEnumerableOf <string>(); // Assert var exception = Assert.Throws <ActualAssertionException <EmptyAsyncEnumerable <int> > >(action); Assert.Equal(actual, exception.Actual); Assert.Equal($"Expected to be an async enumerable of 'System.String' but found an enumerable of 'System.Int32'.{Environment.NewLine}Actual: {TestData.Empty.ToFriendlyString()}", exception.Message); }