Esempio n. 1
0
        public void DotNetBoolType()
        {
            // arrange
            TypeRegistry typeRegistry = new TypeRegistry();

            typeRegistry.RegisterType(typeof(BooleanType));
            Type nativeType = typeof(bool);

            // act
            TypeInspector typeInspector = new TypeInspector();
            IOutputType   type          = typeInspector.CreateOutputType(typeRegistry, nativeType);

            // assert
            Assert.IsType <BooleanType>(type);
        }
Esempio n. 2
0
        public void DotNetStringType()
        {
            // arrange
            TypeRegistry typeRegistry = new TypeRegistry();

            typeRegistry.RegisterType(typeof(StringType));
            Type nativeType = typeof(string);

            // act
            TypeInspector typeInspector = new TypeInspector();
            IOutputType   type          = typeInspector.CreateOutputType(typeRegistry, nativeType);

            // assert
            Assert.IsType <StringType>(type);
        }
Esempio n. 3
0
        public void Case2_1()
        {
            // arrange
            TypeRegistry typeRegistry = new TypeRegistry();

            typeRegistry.RegisterType(typeof(StringType));
            Type nativeType = typeof(NonNullType <StringType>);

            // act
            TypeInspector typeInspector = new TypeInspector();
            IOutputType   type          = typeInspector.CreateOutputType(typeRegistry, nativeType);

            // assert
            Assert.IsType <NonNullType>(type);
            type = ((NonNullType)type).Type as IOutputType;
            Assert.IsType <StringType>(type);
        }