Пример #1
0
        public void TestDeleteVertex_NotExistant()
        {
            GraphWirth a        = new GraphWirth();
            bool       expected = false;
            bool       actual   = a.DeleteVertex(15);

            Assert.AreEqual(expected, actual, "Non-existant vertex can not be deleated.");
        }
Пример #2
0
        public void TestDeleteVertex_LastOfTwo()
        {
            GraphWirth a        = new GraphWirth();
            bool       expected = true;

            a.AddVertex(15, 1000);
            bool actual = a.DeleteVertex(15);

            Assert.AreEqual(expected, actual, "Error deleting last of two vertexes.");
        }
Пример #3
0
        public void TestDeleteVertex()
        {
            GraphWirth a        = new GraphWirth();
            bool       expected = true;

            a.AddVertex(15, 20);
            a.AddVertex(20);
            bool actual = a.DeleteVertex(15);

            Assert.AreEqual(expected, actual, "Unable to delete vertex.");
        }
Пример #4
0
        public void TestDeleteVertex_FirstOfMany()
        {
            GraphWirth a        = new GraphWirth();
            bool       expected = true;

            a.AddVertex(10);
            a.AddVertex(100);
            a.AddVertex(1000);
            bool actual = a.DeleteVertex(1);

            Assert.AreEqual(expected, actual, "Error deleting first vertex.");
        }