コード例 #1
0
        // prime path 10: [g1, g2, g1]
        // prime path 11: [g2, g1, g2]
        private void path_10_11(Viewer2_Accessor view)
        {
            clear(view);

            Adressbook a1 = addAddressbook(view, "adb1");
            Contact    c1 = addContact(a1, "c1");
            Contact    c2 = addContact(a1, "c2");
            Contact    c3 = addContact(a1, "c3");

            removeContact(view, a1, c3);

            Assert.AreEqual(a1.Contacts.Count, 2);
        }
コード例 #2
0
        // prime path 9: [f1, f2, f1]
        // prime path 12: [f2, f1, f2]
        private void path_9_12(Viewer2_Accessor view)
        {
            clear(view);

            Adressbook a1 = addAddressbook(view, "adb1");
            Contact    c1 = addContact(a1, "c1");
            Adressbook a2 = addAddressbook(view, "adb2");

            removeContact(view, a1, c1);

            Assert.AreEqual(a1.Contacts.Count, 0);
            Assert.AreEqual(a2.Contacts.Count, 0);
        }
コード例 #3
0
        public void PrimePathTest()
        {
            Viewer2_Accessor view = new Viewer2_Accessor();

            // test all prime paths that are feasable
            path_4(view);
            path_7(view);
            path_9_12(view);
            path_10_11(view);
            path_10_11(view);
            path_13(view);
            path_15(view);
            path_16(view);
            path_17_18(view);
            path_19(view);
            path_20(view);
            path_21(view);
            path_22(view);
            path_23(view);
            path_24(view);

            // infeasible prime paths are: 1,2,3,5,6,8
            // where all can be toured with detours except primePath-8
        }
コード例 #4
0
 private void clear(Viewer2_Accessor view)
 {
     view.adressbooks.Clear();
 }