コード例 #1
0
        public void TestTrueMessageWithContext()
        {
            var verifier  = new XUnitVerifier().PushContext("Known Context");
            var exception = Assert.ThrowsAny <TrueException>(() => verifier.True(false));

            Assert.Equal($"Context: Known Context{Environment.NewLine}{Environment.NewLine}Expected: True{Environment.NewLine}Actual:   False", exception.Message);
        }
コード例 #2
0
        public void TestTrueMessage()
        {
            var verifier  = new XUnitVerifier();
            var exception = Assert.ThrowsAny <TrueException>(() => verifier.True(false));

            Assert.Equal($"Assert.True() Failure{Environment.NewLine}Expected: True{Environment.NewLine}Actual:   False", exception.Message);
        }