예제 #1
0
        public void CreateInstance_creates_instance_of_correct_type(ActivatorInstanceCreator sut)
        {
            // Act
            var result = sut.CreateInstance(typeof(MySampleType));

            // Assert
            Assert.That(result, Is.InstanceOf <MySampleType>());
        }
예제 #2
0
        public void CreateInstance_can_create_instance_of_a_type_with_a_parameterless_constructor(ActivatorInstanceCreator sut)
        {
            // Act
            var result = sut.CreateInstance(typeof(MySampleType));

            // Assert
            Assert.That(result, Is.Not.Null);
        }