public void TestFailMessage()
        {
            var verifier  = new NUnitVerifier();
            var exception = Assert.Throws <AssertionException>(() => verifier.Fail());

            verifier.EqualOrDiff(string.Empty, exception.Message);
        }
        public void TestFalseCustomMessageWithContext()
        {
            var verifier  = new NUnitVerifier().PushContext("Known Context");
            var exception = Assert.Throws <AssertionException>(() => verifier.False(true, "Custom message"));

            verifier.EqualOrDiff($"  Context: Known Context{Environment.NewLine}Custom message{Environment.NewLine}  Expected: False{Environment.NewLine}  But was:  True{Environment.NewLine}", exception.Message);
        }
        public void TestFalseMessage()
        {
            var verifier  = new NUnitVerifier();
            var exception = Assert.Throws <AssertionException>(() => verifier.False(true));

            verifier.EqualOrDiff($"  Expected: False{Environment.NewLine}  But was:  True{Environment.NewLine}", exception.Message);
        }
        public void TestEmptyMessageWithContext()
        {
            var actual    = new int[1];
            var verifier  = new NUnitVerifier().PushContext("Known Context");
            var exception = Assert.Throws <AssertionException>(() => verifier.Empty("someCollectionName", actual));

            verifier.EqualOrDiff($"  Context: Known Context{Environment.NewLine}Expected 'someCollectionName' to be empty, contains '1' elements{Environment.NewLine}  Expected: <empty>{Environment.NewLine}  But was:  < 0 >{Environment.NewLine}", exception.Message);
        }
        public void TestNotEmptyMessage()
        {
            var actual    = new int[0];
            var verifier  = new NUnitVerifier();
            var exception = Assert.Throws <AssertionException>(() => verifier.NotEmpty("someCollectionName", actual));

            verifier.EqualOrDiff($"  expected 'someCollectionName' to be non-empty, contains{Environment.NewLine}  Expected: not <empty>{Environment.NewLine}  But was:  <empty>{Environment.NewLine}", exception.Message);
        }
        public void TestEqualCustomMessageWithContext()
        {
            var expected  = 0;
            var actual    = 1;
            var verifier  = new NUnitVerifier().PushContext("Known Context");
            var exception = Assert.Throws <AssertionException>(() => verifier.Equal(expected, actual, "Custom message"));

            verifier.EqualOrDiff($"  Context: Known Context{Environment.NewLine}Custom message{Environment.NewLine}  Expected: 0{Environment.NewLine}  But was:  1{Environment.NewLine}", exception.Message);
        }
        public void TestEqualMessage()
        {
            var expected  = 0;
            var actual    = 1;
            var verifier  = new NUnitVerifier();
            var exception = Assert.Throws <AssertionException>(() => verifier.Equal(expected, actual));

            verifier.EqualOrDiff($"  Expected: 0{Environment.NewLine}  But was:  1{Environment.NewLine}", exception.Message);
        }
        public void TestSequenceEqualCustomMessageWithContext()
        {
            var expected  = new int[] { 0 };
            var actual    = new int[] { 1 };
            var verifier  = new NUnitVerifier().PushContext("Known Context");
            var exception = Assert.Throws <AssertionException>(() => verifier.SequenceEqual(expected, actual, message: "Custom message"));

            verifier.EqualOrDiff($"Context: Known Context{Environment.NewLine}Custom message", exception.Message);
        }
        public void TestSequenceEqualCustomMessage()
        {
            var expected  = new int[] { 0 };
            var actual    = new int[] { 1 };
            var verifier  = new NUnitVerifier();
            var exception = Assert.Throws <AssertionException>(() => verifier.SequenceEqual(expected, actual, message: "Custom message"));

            verifier.EqualOrDiff($"Custom message", exception.Message);
        }
        public void TestSequenceEqualMessage()
        {
            var expected  = new int[] { 0 };
            var actual    = new int[] { 1 };
            var verifier  = new NUnitVerifier();
            var exception = Assert.Throws <AssertionException>(() => verifier.SequenceEqual(expected, actual));

            verifier.EqualOrDiff(string.Empty, exception.Message);
        }