public void InnerExceptionWillMatchConstructorArgument()
        {
            var expectedException = new ArgumentOutOfRangeException();
            var sut = new TypeArgumentsCannotBeInferredException("Anonymous message.", expectedException);

            var result = sut.InnerException;
            
            Assert.Equal(expectedException, result);
        }
        public void MessageWillMatchConstructorArgument()
        {
            string expectedMessage = "Anonymous exception message";
            var sut = new TypeArgumentsCannotBeInferredException(expectedMessage);

            var result = sut.Message;
            
            Assert.Equal(expectedMessage, result);
        }
        public void MessageWillBeDefineWhenInitializedWithMethodInfo()
        {
            Action dummy = delegate { };
            var sut = new TypeArgumentsCannotBeInferredException(dummy.Method);

            var result = sut.Message;

            Assert.NotNull(result);
        }
 public void MessageWillBeDefineWhenDefaultConstructorIsUsed()
 {
     var sut = new TypeArgumentsCannotBeInferredException();
     var result = sut.Message;
     Assert.NotNull(result);
 }
 public void SutIsException()
 {
     var sut = new TypeArgumentsCannotBeInferredException();
     Assert.IsAssignableFrom<Exception>(sut);
 }