Esempio n. 1
0
        public void CapturedErrorHasCodeTest()
        {
            var ce = new CapturedError();

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

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

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

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