Пример #1
0
 public void Constructors50_Test()
 {
     //Ported from Const50.cs
     OutputHelper.WriteLine("The scope of the parameters given by the formal");
     OutputHelper.WriteLine("parameter list of a constructor includes the");
     OutputHelper.WriteLine("constructor initializer of that declaration.");
     OutputHelper.WriteLine("Thus, a constructor initializer is permitted to");
     OutputHelper.WriteLine("access the parameters of the constructor.");
     Assert.True(ConstructorsTestClass50.testMethod());
 }
Пример #2
0
            public static bool testMethod()
            {
                ConstructorsTestClass50 test = new ConstructorsTestClass50(5, 3);

                if (test.intI == 22)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
Пример #3
0
 public MFTestResults Constructors50_Test()
 {
     //Ported from Const50.cs
     Log.Comment("The scope of the parameters given by the formal");
     Log.Comment("parameter list of a constructor includes the");
     Log.Comment("constructor initializer of that declaration.");
     Log.Comment("Thus, a constructor initializer is permitted to");
     Log.Comment("access the parameters of the constructor.");
     if (ConstructorsTestClass50.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }
 public static bool testMethod()
 {
     ConstructorsTestClass50 test = new ConstructorsTestClass50(5, 3);
     if (test.intI == 22)
     {
         return true;
     }
     else
     {
         return false;
     }
 }