Ejemplo n.º 1
0
        public void ShouldlyMessage_WhenComparingMatchingStringsOver100Characters_ShouldNotClipStringForComparison()
        {
            var longString = new string('a', 110) + "zzzz";

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

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