public void SetTypeInstance()
        {
            // arrange
            var descriptor = new ArgumentDescriptor(Context, "Type");

            // act
            descriptor.Type(new StringType());

            // assert
            ArgumentDefinition description = descriptor.CreateDefinition();
            ITypeReference     typeRef     = description.Type;

            Assert.IsType <StringType>(
                Assert.IsType <SchemaTypeReference>(typeRef).Type);
        }
        public void SetNonGenericType()
        {
            // arrange
            var descriptor = new ArgumentDescriptor(Context, "Type");

            // act
            descriptor.Type(typeof(StringType));

            // assert
            ArgumentDefinition description = descriptor.CreateDefinition();
            ITypeReference     typeRef     = description.Type;

            Assert.Equal(
                typeof(StringType),
                Assert.IsType <ExtendedTypeReference>(typeRef).Type.Source);
        }
        public void DotNetTypesDoNotOverwriteSchemaTypes()
        {
            // arrange
            var descriptor = new ArgumentDescriptor(Context, "Type");

            // act
            descriptor
            .Type <ListType <StringType> >()
            .Type <NativeType <IReadOnlyDictionary <string, string> > >();

            // assert
            ArgumentDefinition description = descriptor.CreateDefinition();
            ITypeReference     typeRef     = description.Type;

            Assert.Equal(typeof(ListType <StringType>),
                         Assert.IsType <ExtendedTypeReference>(typeRef).Type.Source);
        }