Esempio n. 1
0
 private void ApplyNodeFilter(SourceCollection sources) => sources.Remove(_diffingStrategy.Filter);
Esempio n. 2
0
 /// <summary>
 /// Creates a diffing engine which will perform a comparison of the control and test sources, using the provided strategies.
 /// </summary>
 public HtmlDifferenceEngine(IDiffingStrategy diffingStrategy, SourceCollection controlSources, SourceCollection testSources)
 {
     _diffingStrategy = diffingStrategy ?? throw new ArgumentNullException(nameof(diffingStrategy));
     _controlSources  = controlSources ?? throw new ArgumentNullException(nameof(controlSources));
     _testSources     = testSources ?? throw new ArgumentNullException(nameof(testSources));
     Context          = new DiffContext(controlSources, testSources);
 }
 private static IEnumerable <Comparison> NoneNodeMatcher(IDiffContext ctx, SourceCollection controlNodes, SourceCollection testNodes)
 => Array.Empty <Comparison>();
 private static IEnumerable <Comparison> OneToOneNodeListMatcher(
     IDiffContext context,
     SourceCollection controlNodes,
     SourceCollection testNodes) => OneToOneNodeMatcher.Match(context, controlNodes, testNodes);
        public void Test0(ComparisonSourceType sourceType)
        {
            var sut = new SourceCollection(sourceType, Array.Empty <ComparisonSource>());

            sut.SourceType.ShouldBe(sourceType);
        }