Exemplo n.º 1
0
        public void ExceptionWithInternalException_AsFailedOpResult_MatchingFailedOperationResult()
        {
            //Arrange
            const string errorMessage = "Some error message 2";
            var          exception    = new Exception("external exception message", new Exception(errorMessage));

            //Act
            var opRes = exception.AsFailedOpRes();

            //Assert
            Assert.IsFalse(opRes.Success);
            Assert.AreEqual(errorMessage, opRes.ErrorMessage);
        }