public MFTestResults BaseClass3_Test()
 {
     Log.Comment("Tests a function declaration in an implementing class still works after child is cast as");
     Log.Comment("each of two implemented interfaces");
     if (BaseClassTestClass3.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }
            public static bool testMethod()
            {
                BaseClassTestClass3       MC    = new BaseClassTestClass3();
                BaseClassTestClass3_Base1 Test1 = (BaseClassTestClass3_Base1)MC;
                BaseClassTestClass3_Base2 Test2 = (BaseClassTestClass3_Base2)MC;

                if ((Test1.RetInt() == 2) && (Test2.RetInt2() == 3))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
Exemplo n.º 3
0
 public static bool testMethod()
 {
     BaseClassTestClass3 MC = new BaseClassTestClass3();
     BaseClassTestClass3_Base1 Test1 = (BaseClassTestClass3_Base1)MC;
     BaseClassTestClass3_Base2 Test2 = (BaseClassTestClass3_Base2)MC;
     if ((Test1.RetInt() == 2) && (Test2.RetInt2() == 3))
     {
         return true;
     }
     else
     {
         return false;
     }
 }
 public void BaseClass3_Test()
 {
     OutputHelper.WriteLine("Tests a function declaration in an implementing class still works after child is cast as");
     OutputHelper.WriteLine("each of two implemented interfaces");
     Assert.True(BaseClassTestClass3.testMethod());
 }