Пример #1
0
        public void DeleteEquationRelationship_DeletesFromUnderlyingGraph()
        {
            int fromEid     = 0;
            int toEid       = 1;
            int equationEid = 2;
            var fromPoint   = A.Fake <IPoint>();

            A.CallTo(() => fromPoint.Eid).Returns(fromEid);
            var toPoint = A.Fake <IPoint>();

            A.CallTo(() => fromPoint.Eid).Returns(toEid);
            var equation = new PointEquation(equationEid, null);

            _pointGraph.AddPoint(fromPoint);
            _pointGraph.AddPoint(toPoint);
            _pointGraph.AddEquation(equation);

            _pointGraph.AddEquationRelationship(fromPoint, toPoint, equation);
            _pointGraph.DeleteEquationRelationship(fromPoint, toPoint, equation);

            A.CallTo(() => _underlyingDirectedGraph.RemoveDirectedEdge(fromPoint, toPoint, equation)).MustHaveHappened();
        }
Пример #2
0
 public void DeleteEquationRelationship(IPoint from, IPoint to, PointEquation equation)
 {
     _graph.RemoveDirectedEdge(from, to, equation);
 }