Example #1
0
        public void T_IsDuplicata_True_Reverse()
        {
            // Arrange
            Cell cell  = new Cell();
            Cell cell2 = new Cell();

            cell.Value  = '1';
            cell2.Value = 'A';
            GraphNode graphNodeBgn  = new GraphNode(cell);
            GraphNode graphNodeEnd  = new GraphNode(cell2);
            GraphNode graphNodeBgn1 = new GraphNode(cell);
            GraphNode graphNodeEnd1 = new GraphNode(cell2);
            GraphArc  graphArc      = new GraphArc(graphNodeBgn, graphNodeEnd);
            GraphArc  graphArc2     = new GraphArc(graphNodeEnd1, graphNodeBgn1);

            // Act
            bool isDuplicata = graphArc.IsDuplicata(graphArc2);

            // Assert
            Assert.IsTrue(isDuplicata);
        }
Example #2
0
        public void T_IsDuplicata_False_Node2()
        {
            // Arrange
            Cell cell  = new Cell();
            Cell cell2 = new Cell();
            Cell cell3 = new Cell();

            cell.Value  = '1';
            cell2.Value = 'A';
            cell3.Value = '8';
            GraphNode graphNodeBgn  = new GraphNode(cell);
            GraphNode graphNodeEnd  = new GraphNode(cell3);
            GraphNode graphNodeBgn1 = new GraphNode(cell);
            GraphNode graphNodeEnd1 = new GraphNode(cell2);
            GraphArc  graphArc      = new GraphArc(graphNodeBgn, graphNodeEnd);
            GraphArc  graphArc2     = new GraphArc(graphNodeBgn1, graphNodeEnd1);

            // Act
            bool isDuplicata = graphArc.IsDuplicata(graphArc2);

            // Assert
            Assert.IsFalse(isDuplicata);
        }