コード例 #1
0
        public void ClientConnectionException_ConstructWithInnerException_ShouldHaveInnerException()
        {
            Exception innerException = new Exception("InnerError");

            ClientConnectionException clientConnectionException = new ClientConnectionException(null, innerException);
            clientConnectionException.InnerException.Message.ShouldBeEqual("InnerError");
        }
コード例 #2
0
        public void ClientConnectionException_CunstructWithMessage_ShouldHaveMessage()
        {
            ClientConnectionException clientConnectionException = new ClientConnectionException("Error");
            clientConnectionException.Message.ShouldBeEqual("Error");

            ClientConnectionException clientConnectionExceptionOverload = new ClientConnectionException("Error", null);
            clientConnectionExceptionOverload.Message.ShouldBeEqual("Error");
        }