示例#1
0
        public void CapturedErrorHasCodeTest()
        {
            var ce = new CapturedError();

            ce.ErrorCode("Level-1", "Cap", 12);
            Assert.IsTrue(ce.HasCode("Level-1", "Cap"));
        }
示例#2
0
        public void CapturedErrorHasCodeWithNoParametersTest()
        {
            var ce = new CapturedError();

            ce.ErrorCode("Level-1", "Cap", 12);
            Assert.IsTrue(ce.HasCode());
        }
示例#3
0
        public void CapturedErrorHasCodeSoughtTooLongTest()
        {
            var ce = new CapturedError();

            ce.ErrorCode("Level-1", "Cap", 12);
            Assert.IsFalse(ce.HasCode("Level-1", "Cap", 12, "List"));
        }
示例#4
0
        public void CapturedErrorHasCodeMismatchTest()
        {
            var ce = new CapturedError();

            ce.ErrorCode("Level-1", "Cap", 12);
            Assert.IsFalse(ce.HasCode("Level-1", "Flip"));
        }
示例#5
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));
        }