コード例 #1
0
        public void InternalExceptionConstrucotr_WhenMessageIsCorrect_ReturnCorrectMessage()
        {
            string message = "Exception message";
              InternalException internalException = new InternalException(message);

              Assert.AreEqual(message, internalException.Message);
        }
コード例 #2
0
        public void InternalExceptionConstrucotr_WhenMessageAndInnerExceptionIsCorrect_ReturnCorrectMessageAndInnerException()
        {
            string message = "Exception message";
              InvalidOperationException invalidOperationException = new InvalidOperationException();
              InternalException internalException = new InternalException(message, invalidOperationException);

              Assert.AreEqual(message, internalException.Message);
              Assert.AreEqual(invalidOperationException, internalException.InnerException);
        }