示例#1
0
        public void should_resolve_correct_type()
        {
            var genericObjectWithStringAsTypeArgument = new BasicGenericDemoClass <string>();

            Type valuePropertyType = genericObjectWithStringAsTypeArgument.GetPropertyType("Value");

            // correct the variable value to fix the test
            Type expectedValuePropertyType = typeof(object);

            Assert.Equal(expectedValuePropertyType, valuePropertyType);
        }
        public void should_resolve_correct_type()
        {
            var genericObjectWithStringAsTypeArgument = new BasicGenericDemoClass<string>();

            Type valuePropertyType = genericObjectWithStringAsTypeArgument.GetPropertyType("Value");

            // correct the variable value to fix the test
            Type expectedValuePropertyType = typeof(object);

            Assert.Equal(expectedValuePropertyType, valuePropertyType);
        }