public void ShouldlyMessage_WhenComparingMatchingStringsOver100Characters_ShouldNotClipStringForComparison() { var longString = new string('a', 110) + "zzzz"; Should.NotError( () => longString.ShouldContain("zzzz")); }
public void ShouldThrow_WhenItThrowsCorrectException() { Action shouldThrowAction = () => Shouldly.Should.Throw <NotImplementedException>(() => { throw new NotImplementedException(); }); Should.NotError(shouldThrowAction); }
public void ShouldNotThrow_IfCallDoesNotThrow_ShouldDoNothing() { Should.NotError( () => Shouldly.Should.NotThrow(() => {}) ); }
public void ShouldNotBeEmpty_WhenNotEmpty_ShouldNotError() { Should.NotError(() => new[] { new object() }.ShouldNotBeEmpty()); }
public void ShouldBeEmpty_WhenEmpty_ShouldNotError() { Should.NotError(() => new object[0].ShouldBeEmpty()); }