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."); }
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."); }
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"); }
public void ConnectionTypeNotGivenExceptionConstructorTest() { ConnectionTypeNotGivenException target = new ConnectionTypeNotGivenException(); Assert.IsNotNull(target, "ConnectionTypeNotGivenException Object created."); }