Ejemplo n.º 1
0
        public void ConnectionTypeNotGivenExceptionConstructorTest1()
        {
            string message = "Testmessage";
            ConnectionTypeNotGivenException target = new ConnectionTypeNotGivenException(message);

            Assert.IsNotNull(target, "ConnectionTypeNotGivenException Object created.");
            Assert.AreEqual(message, target.ExceptionMessage, "Messages are equal.");
        }
Ejemplo n.º 2
0
        public void ConnectionTypeNotGivenExceptionConstructorTest2()
        {
            string    message         = "Testmessage";
            Exception innnerException = new Exception("Inner exception");
            ConnectionTypeNotGivenException target = new ConnectionTypeNotGivenException(message, innnerException);

            Assert.IsNotNull(target, "ConnectionTypeNotGivenException Object created.");
            Assert.AreEqual(message, target.Message, "Messages are equal.");
            Assert.AreSame(innnerException, target.InnerException, "Inner exception equal.");
        }
Ejemplo n.º 3
0
        public void ConnectionTypeNotGivenExceptionSerializeTest()
        {
            string message = "Error Serial test ConnectionTypeNotGivenException";
            ConnectionTypeNotGivenException testException = new ConnectionTypeNotGivenException(message);
            string fileName = "Exception.test";

            Assert.IsTrue(Serializer.Serialize(fileName, testException), "Serialized");
            ConnectionTypeNotGivenException result = (Serializer.Deserialize <ConnectionTypeNotGivenException>(fileName));

            Assert.IsInstanceOfType(result, typeof(ConnectionTypeNotGivenException), "Deserialized");
            Assert.IsTrue(message.Equals(result.ExceptionMessage), "Exception message equal");
        }
Ejemplo n.º 4
0
        public void ConnectionTypeNotGivenExceptionConstructorTest()
        {
            ConnectionTypeNotGivenException target = new ConnectionTypeNotGivenException();

            Assert.IsNotNull(target, "ConnectionTypeNotGivenException Object created.");
        }