public void Fields24_testMethod() { OutputHelper.WriteLine(" Section 10.4"); OutputHelper.WriteLine(" When a field-declaration includes a readonly"); OutputHelper.WriteLine(" modifier, assignments to the fields introduced"); OutputHelper.WriteLine(" by the declaration can only occur as part of"); OutputHelper.WriteLine(" the declaration or in a constructor in the"); OutputHelper.WriteLine(" same class."); Assert.True(FieldsTestClass24.testMethod()); }
public static bool testMethod() { FieldsTestClass24 MC = new FieldsTestClass24(); if ((MC.intI == 2) && (MC.strS.Equals("MyString")) && (MC.enuE == FieldsTestClass24_Enum.a) && (MC.sctS.Test == 3) && (MC.clsC.Test == 4)) { return(true); } else { return(false); } }
public MFTestResults Fields24_testMethod() { Log.Comment(" Section 10.4"); Log.Comment(" When a field-declaration includes a readonly"); Log.Comment(" modifier, assignments to the fields introduced"); Log.Comment(" by the declaration can only occur as part of"); Log.Comment(" the declaration or in a constructor in the"); Log.Comment(" same class."); if (FieldsTestClass24.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static bool testMethod() { FieldsTestClass24 MC = new FieldsTestClass24(); if ((MC.intI == 2) && (MC.strS.Equals("MyString")) && (MC.enuE == FieldsTestClass24_Enum.a) && (MC.sctS.Test == 3) && (MC.clsC.Test == 4)) { return true; } else { return false; } }