示例#1
0
        public void IdenticalSinglePropertyDocuments()
        {
            var originalDocument = @"
                lorem: ipsum
            ";
            var changedDocument  = @"
                lorem: ipsum
            ";

            var result = new MappingNodeComparer().Compare(new Path(), (YamlMappingNode)Parser.Parse(originalDocument), (YamlMappingNode)Parser.Parse(changedDocument));

            Assert.Empty(result);
        }
示例#2
0
        public void DetectChangedScalarNode()
        {
            var originalDocument = @"
                lorem: ipsum
            ";
            var changedDocument  = @"
                lorem: dolor
            ";

            var result = new MappingNodeComparer().Compare(new Path(), (YamlMappingNode)Parser.Parse(originalDocument), (YamlMappingNode)Parser.Parse(changedDocument));

            Assert.Single(result);
            Assert.Equal(new[] { "lorem" }, result.Single().Path.Segments);
        }