コード例 #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);
        }
コード例 #2
0
        public void GetPrimaryParents_ChoosesFirstInNameOrder()
        {
            _testGraphBuilder.SetUp(
                "P2<-C",
                "P1<-C"
                );

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