public void WrapHandlerNodeDefaults()
        {
            WrapHandlerNode wrapHandler = new WrapHandlerNode();

            Assert.AreEqual(string.Empty, wrapHandler.ExceptionMessage);
            Assert.AreEqual(null, wrapHandler.WrapExceptionType);
            Assert.AreEqual("Wrap Handler", wrapHandler.Name);
        }
예제 #2
0
        public void WrapHandlerNodeDataTest()
        {
            string name = "some name";
            string message = "some message";
            Type wrapExceptionType = typeof(ApplicationException);

            WrapHandlerData wrapHandlerData = new WrapHandlerData();
            wrapHandlerData.Name = name;
            wrapHandlerData.ExceptionMessage = message;
            wrapHandlerData.WrapExceptionType = wrapExceptionType;

            WrapHandlerNode wrapHandlerNode = new WrapHandlerNode(wrapHandlerData);

            WrapHandlerData nodeData = (WrapHandlerData)wrapHandlerNode.ExceptionHandlerData;
            Assert.AreEqual(name, nodeData.Name);
            Assert.AreEqual(message, nodeData.ExceptionMessage);
            Assert.AreEqual(wrapExceptionType, nodeData.WrapExceptionType);
        }
예제 #3
0
        public void WrapHandlerDataTest()
        {
            string name = "some name";
            string message = "some message";
            Type exceptionType = typeof(AppDomainUnloadedException);
            Type wrapExceptionType = typeof(ApplicationException);

            WrapHandlerData data = new WrapHandlerData();
            data.Name = name;
            data.ExceptionMessage = message;
            data.Type = exceptionType;
            data.WrapExceptionType = wrapExceptionType;

            WrapHandlerNode node = new WrapHandlerNode(data);
            Assert.AreEqual(name, node.Name);
            Assert.AreEqual(message, node.ExceptionMessage);
            Assert.AreEqual(wrapExceptionType, node.WrapExceptionType);
        }