Пример #1
0
        public void ToString_error()
        {
            Graph1 g = new Graph1();

            g.AddNode("Kyiv");
            g.AddNode("Lviv");
            Assert.AreEqual("Kyiv Lviv ", g.ToString());
        }
Пример #2
0
        public void AddNode_error()
        {
            Graph1 g = new Graph1();

            g.AddNode("Kyiv");
            g.AddNode("Lviv");
            g.AddNode("Donetsk");
            Assert.AreEqual(3, g.nodes.Length);
        }
Пример #3
0
        public void AddNode_exception_error()
        {
            Graph1 g = new Graph1();

            Assert.Throws(typeof(ArgumentException), () => g.AddNode(""));
        }