public void TestSchemaFragmentsIterator() { // arrange var counter = new UidPropertyCounter(); var iterator = new SchemaFragmentsIterator(counter); DocumentSchema schema; using (var sr = new StreamReader("TestData/schemas/rest.mixed.schema.json")) { schema = DocumentSchema.Load(sr, "rest.mixed"); } var yamlStream = new YamlStream(); using (var sr = new StreamReader("TestData/inputs/Suppressions.yml")) { yamlStream.Load(sr); } // act iterator.Traverse(yamlStream.Documents[0].RootNode, new Dictionary <string, MarkdownFragment>(), schema); // assert Assert.Single(counter.ExistingUids); Assert.Equal("management.azure.com.advisor.suppressions", counter.ExistingUids[0]); Assert.Single(counter.ExistingMarkdownProperties); Assert.Equal("definitions[name=\"Application 1\"]/properties[name=\"id\"]/description", counter.ExistingMarkdownProperties[0]); Assert.Equal(6, counter.MissingMarkdownProperties.Count); }