示例#1
0
        public Type CreateType()
        {
            TypeDraft typeDraft           = this.CreateTypeDraft();
            IClient   commerceToolsClient = this.GetService <IClient>();
            Type      createdType         = commerceToolsClient.ExecuteAsync(new CreateCommand <Type>(typeDraft)).Result;

            return(createdType);
        }
        public void DeserializeStringFieldType()
        {
            ISerializerService serializerService = this.serializationFixture.SerializerService;
            string             serialized        = File.ReadAllText("Resources/FieldTypes/String.json");
            Type deserialized = serializerService.Deserialize <Type>(serialized);

            Assert.IsType <StringFieldType>(deserialized.FieldDefinitions[0].Type);
        }