Example #1
0
        public void DeserializeContractToTupleTest(string contract)
        {
            var testDictionary       = new CaseInsensitiveDictionary <SchemaObject>();
            var jsonObjectDictionary = (JsonObject)JsonValue.Parse(contract);

            foreach (var key in jsonObjectDictionary.Keys)
            {
                var jsonObject         = jsonObjectDictionary[key];
                var schemaObjectString = jsonObject.ToString();
                JsonValue.Parse(schemaObjectString);
                var schemaObject = SchemaObject.ConvertJsonToSchema(schemaObjectString);
                testDictionary.Add(key, schemaObject);
            }

            testDictionary.ShouldNotBeEmpty();
            testDictionary.Count.ShouldBe(2);
        }