Exemple #1
0
        public void Exercise3Method2Test2()
        {
            Exercise3 e3 = new Exercise3();

            Bewegung[] bewegungen = (Bewegung[])e3.Method2();
            Assert.AreEqual(bewegungen.Length, 2);
        }
Exemple #2
0
        public void Ex3Method2_Method2_true()
        {
            Exercise3 ex3 = new Exercise3();

            Bewegung[] bew = (Bewegung[])ex3.Method2();

            Assert.Equal(2, bew.Length);
        }
        public void Test9()
        {
            var ex  = new Exercise3();
            var arr = ex.Method2();

            Assert.AreEqual(typeof(Springen), ((Bewegung[])arr)[0].GetType());
            Assert.AreEqual(typeof(Laufen), ((Bewegung[])arr)[1].GetType());
        }
Exemple #4
0
        public void Ex3Test4()
        {
            Exercise3 ex3 = new Exercise3();

            Bewegung[] test = (Bewegung[])ex3.Method2();

            Assert.AreEqual(test.Length, 2);
        }
Exemple #5
0
        public void Exercise3Method2Test1()
        {
            Exercise3 e3 = new Exercise3();

            Bewegung[] bewegungen = (Bewegung[])e3.Method2();
            Laufen     laufen     = new Laufen();

            Assert.AreEqual(bewegungen[0].GetType(), laufen.GetType());
        }
        public void Test6()
        {
            Exercise3 ex3 = new Exercise3();

            Object[] arr = new Object[2];
            arr[0] = new Springen();
            arr[1] = new Laufen();
            Assert.AreEqual(arr, ex3.Method2());
        }
 public void TestHeteroArray()
 {
     try
     {
         Bewegung beweg = testex3.Method2() as Bewegung;
         Assert.IsTrue(true);
     }
     catch (System.Exception)
     {
         Assert.IsTrue(false);
     }
 }
Exemple #8
0
 public void Method2TestIfReturnIsNotNull()
 {
     Assert.IsNotNull(ex3.Method2());
 }