Example #1
0
        public void AddNode_IncGraphSizeBy1()
        {
            // Arrange
            var graph = new Aca.Model.Graph();
            var count = graph.Size;

            // Act
            graph.AddNode(new Aca.Model.Node());

            // Assert
            Assert.IsTrue(graph.Size == count + 1);
        }
Example #2
0
        public void RemoveNode_DecGraphSizeBy1()
        {
            // Arrange
            var graph = new Aca.Model.Graph();
            var node  = new Aca.Model.Node();

            graph.AddNode(node);
            var count = graph.Size;

            // Act
            graph.RemoveNode(node);

            // Assert
            Assert.IsTrue(graph.Size == count - 1);
        }