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); }
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); }
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); }