public void InvokeWithSingleParameterReturnsCorrectResult(Type targetType, object parameter)
        {
            // Arrange
            var ctor = targetType.GetConstructor(targetType.GetTypeInfo().GetGenericArguments().ToArray());
            var sut  = new ConstructorMethod(ctor);
            // Act
            var result = sut.Invoke(new[] { parameter });

            // Assert
            Assert.IsAssignableFrom(targetType, result);
        }
        public void InvokeWithDefaultConstructorReturnsCorrectResult(Type targetType)
        {
            // Arrange
            var ctor = targetType.GetConstructor(Type.EmptyTypes);
            var sut  = new ConstructorMethod(ctor);
            // Act
            var result = sut.Invoke(Enumerable.Empty <object>());

            // Assert
            Assert.IsAssignableFrom(targetType, result);
        }
 public void InvokeWithDefaultConstructorReturnsCorrectResult(Type targetType)
 {
     // Fixture setup
     var ctor = targetType.GetConstructor(Type.EmptyTypes);
     var sut = new ConstructorMethod(ctor);
     // Exercise system
     var result = sut.Invoke(Enumerable.Empty<object>());
     // Verify outcome
     Assert.IsAssignableFrom(targetType, result);
     // Teardown
 }
        public void InvokeWithSingleParameterReturnsCorrectResult(Type targetType, object parameter)
        {
            // Fixture setup
            var ctor = targetType.GetConstructor(targetType.GetGenericArguments().ToArray());
            var sut  = new ConstructorMethod(ctor);
            // Exercise system
            var result = sut.Invoke(new[] { parameter });

            // Verify outcome
            Assert.IsAssignableFrom(targetType, result);
            // Teardown
        }
        public void InvokeWithDefaultConstructorReturnsCorrectResult(Type targetType)
        {
            // Fixture setup
            var ctor = targetType.GetConstructor(Type.EmptyTypes);
            var sut  = new ConstructorMethod(ctor);
            // Exercise system
            var result = sut.Invoke(Enumerable.Empty <object>());

            // Verify outcome
            Assert.IsAssignableFrom(targetType, result);
            // Teardown
        }
 public void InvokeWithSingleParameterReturnsCorrectResult(Type targetType, object parameter)
 {
     // Fixture setup
     var ctor = targetType.GetConstructor(targetType.GetGenericArguments().ToArray());
     var sut = new ConstructorMethod(ctor);
     // Exercise system
     var result = sut.Invoke(new[] { parameter });
     // Verify outcome
     Assert.IsAssignableFrom(targetType, result);
     // Teardown
 }