Esempio n. 1
0
        public void Compare_SimpleCases()
        {
            _testGraphBuilder.SetUp("A", "B");
            var comparer = new SiblingsComparer(TestGraph);

            comparer.Compare(GetVertex("A"), GetVertex("B")).Should().BeLessThan(0);
            comparer.Compare(GetVertex("B"), GetVertex("A")).Should().BeGreaterThan(0);
            comparer.Compare(GetVertex("A"), GetVertex("A")).Should().Be(0);
        }
        public void GetPrimaryParents_ChoosesFirstInNameOrder()
        {
            _testGraphBuilder.SetUp(
                "P2<-C",
                "P1<-C"
                );

            TestGraph.GetPrimaryParent(GetVertex("C")).Should().BeEquivalentTo(GetVertex("P1"));
        }
Esempio n. 3
0
 public void GetTargetLocation_FirstVertex()
 {
     _graphBuilder.SetUp("A");
     _calculator.GetTargetLocation(GetVertex("A")).Should().Be(new RelativeLocation(0, 0));
 }