Exemplo n.º 1
0
        public void CreateGenericBuilder_create_builder_if_provide_an_inherit_type_of_generic_ValidationBuilder(Type defaultType, Type expectedType)
        {
            // Action
            var builder = ValidationBuilderHelpers.CreateGenericBuilder(expression, defaultType);

            // Assert
            Assert.That(builder, Is.TypeOf(expectedType));
        }
Exemplo n.º 2
0
        public void CreateGenericBuilder_create_ValidationBuilder_if_default_generic_type_is_ValidationBuilder()
        {
            // Action
            var builder = ValidationBuilderHelpers.CreateGenericBuilder(expression, typeof(ValidationBuilder <, >));

            // Assert
            Assert.That(builder, Is.TypeOf(typeof(ValidationBuilder <Order, OrderDetail>)));
        }
Exemplo n.º 3
0
 public void CreateGenericBuilder_throw_exception_if_cannot_create_validation_builder(Type defaultType, Type expectedType)
 {
     // Action
     Assert.Throws <Exception>(() => ValidationBuilderHelpers.CreateGenericBuilder(expression, defaultType));
 }