Exemplo n.º 1
0
        public void GaNaarLaatsteCorrecteStapGeeftRootBijDiepte1()
        {
            tree = new DeterminatieTree(rootTree1, Graad.graad1);
            Node n = tree.GaNaarLaatsteCorrecteStap(klimatogram);

            Assert.AreEqual(rootTree1, n);
            Assert.AreEqual(rootTree1, tree.GeefHuidigeNode());
        }
Exemplo n.º 2
0
        public void GaNaarLaatsteCorrecteStapGeeftRootAlsDitLaatsteCorrecteStapIs()
        {
            tree = new DeterminatieTree(rootTree3, Graad.graad2);
            tree.StapVerder(true);
            tree.StapVerder(false);
            Node n = tree.GaNaarLaatsteCorrecteStap(klimatogram);

            Assert.AreEqual(rootTree3, n);
            Assert.AreEqual(rootTree3, tree.GeefHuidigeNode());
        }
Exemplo n.º 3
0
        public void GaNaarLaatsteCorrecteStapGeeftCorrecteNode()
        {
            tree = new DeterminatieTree(rootTree3, Graad.graad2);
            tree.StapVerder(false);
            tree.StapVerder(true);
            tree.StapVerder(true);
            Node current = rootTree3;

            current = ((VraagNode)current).NeeKind;
            current = ((VraagNode)current).JaKind;
            Assert.AreEqual(current, tree.GaNaarLaatsteCorrecteStap(klimatogram));
            Assert.AreEqual(current, tree.GeefHuidigeNode());
        }
Exemplo n.º 4
0
 public void GaNaarLaatsteCorrecteStapGooitInvalidOperationExceptionAlsDeterminatieNietCompleetIs()
 {
     tree = new DeterminatieTree(rootTree2, Graad.graad2);
     tree.GaNaarLaatsteCorrecteStap(klimatogram);
 }