Beispiel #1
0
        public void ShouldlyMessage_WhenComparingMatchingStringsOver100Characters_ShouldNotClipStringForComparison()
        {
            var longString = new string('a', 110) + "zzzz";

            Should.NotError(
                () => longString.ShouldContain("zzzz"));
        }
Beispiel #2
0
        public void ShouldThrow_WhenItThrowsCorrectException()
        {
            Action shouldThrowAction =
                () => Shouldly.Should.Throw <NotImplementedException>(() =>
            {
                throw new NotImplementedException();
            });

            Should.NotError(shouldThrowAction);
        }
Beispiel #3
0
 public void ShouldNotThrow_IfCallDoesNotThrow_ShouldDoNothing()
 {
     Should.NotError(
         () => Shouldly.Should.NotThrow(() => {})
         );
 }
Beispiel #4
0
 public void ShouldNotBeEmpty_WhenNotEmpty_ShouldNotError()
 {
     Should.NotError(() => new[] { new object() }.ShouldNotBeEmpty());
 }
Beispiel #5
0
 public void ShouldBeEmpty_WhenEmpty_ShouldNotError()
 {
     Should.NotError(() => new object[0].ShouldBeEmpty());
 }