Beispiel #1
0
        public void CapturedErrorMessageWithParamsTest()
        {
            var ce = new CapturedError();

            ce.ErrorMessage("It's too late {0} and {1}", "p1", 2);
            Assert.IsTrue(ce.Message == "It's too late p1 and 2");
        }
Beispiel #2
0
        public void CapturedErrorMessageTest()
        {
            var ce = new CapturedError();

            ce.ErrorMessage("It's too late");
            Assert.IsTrue(ce.Message == "It's too late");
        }
Beispiel #3
0
        public void CapturedErrorSetMessageAndCodeTest()
        {
            var ce = new CapturedError();

            ce.ErrorMessage("It's too late").ErrorCode("Level-1", "Cap", 12);
            Assert.IsTrue(ce.Message == "It's too late");
            Assert.IsTrue(ce.HasCode("Level-1", "Cap", 12));
        }
Beispiel #4
0
        public void CapturedErrorSettingMessageFlagsErrorTest()
        {
            var ce = new CapturedError();

            ce.ErrorMessage("It's too late");
            var s = ce.Message;

            Assert.IsFalse(ce.IsOK);
            Assert.IsTrue(ce.IsErrored);
        }