Exemplo n.º 1
0
 public void Constructors44_Test()
 {
     //Ported from Const44.cs
     OutputHelper.WriteLine("Section 10.9.5");
     OutputHelper.WriteLine("When a class declares only private constructors it ");
     OutputHelper.WriteLine("is not possible for other classes to derive from");
     OutputHelper.WriteLine("the class or create instances of the class (an System.Exception");
     OutputHelper.WriteLine("being classes nested within the class).");
     Assert.True(ConstructorsTestClass44.testMethod());
 }
Exemplo n.º 2
0
            public static bool testMethod()
            {
                ConstructorsTestClass44 test = new ConstructorsTestClass44();

                if (test.MyInt == 1)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
Exemplo n.º 3
0
 public MFTestResults Constructors44_Test()
 {
     //Ported from Const44.cs
     Log.Comment("Section 10.9.5");
     Log.Comment("When a class declares only private constructors it ");
     Log.Comment("is not possible for other classes to derive from");
     Log.Comment("the class or create instances of the class (an System.Exception");
     Log.Comment("being classes nested within the class).");
     if (ConstructorsTestClass44.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }
 public static bool testMethod()
 {
     ConstructorsTestClass44 test = new ConstructorsTestClass44();
     if (test.MyInt == 1)
     {
         return true;
     }
     else
     {
         return false;
     }
 }