I don't have time to retrieve the source code and compile.
I've checked I don't reference an old version (and I never installed this old version... I started with the 2005 3 month ago.)
I've modified the nunit :
[Test]
public void MyTest2()
{
System.Diagnostics.Debug.WriteLine("RuntimeLibraryVersion.Build : " + SD.LLBLGen.Pro.ORMSupportClasses.RuntimeLibraryVersion.Build);
Timetable tt = new Timetable();
tt.TtMaxConstant = 1;
tt.SetNewFieldValue((int)TimetableFieldIndex.TtMaxConstant, null);
System.Diagnostics.Debug.WriteLine("TimetableFieldIndex.TtMaxConstant isChanged : " + tt.Fields[(int)TimetableFieldIndex.TtMaxConstant].IsChanged);
System.Diagnostics.Debug.WriteLine("TimetableFieldIndex.TtMaxConstant CurrentValue : " + tt.Fields[(int)TimetableFieldIndex.TtMaxConstant].CurrentValue);
Assert.IsTrue(tt.Fields[(int)TimetableFieldIndex.TtMaxConstant].IsChanged);
Assert.IsTrue(tt.TestCurrentFieldValueForNull(TimetableFieldIndex.TtMaxConstant)); // break here
}
------ Test started: Assembly: HRATestCenter.dll ------
RuntimeLibraryVersion.Build : 06062006
TimetableFieldIndex.TtMaxConstant isChanged : True
TimetableFieldIndex.TtMaxConstant CurrentValue : 1
TestCase 'HRAccent.HRATestCenter.BusinessValidations.GenericValidatorTest.MyTest2' failed:
p:\hra_2006_07\hraccentserver.root\hraccentserver\hratestcenter\businessvalidations\genericvalidatortest.cs(274,0): at HRAccent.HRATestCenter.BusinessValidations.GenericValidatorTest.MyTest2()
0 succeeded, 1 failed, 0 skipped, took 1,05 seconds.
---------------------- Done ----------------------
As you can see:
- The runtime libraries are the good one
- The CurrentValue is still "1" after the "SetNewFieldValue" so the source code you paste (CheckIfCurrentFieldValueIsNull method) will of course return false.
So the real question is : why the CurrentValue is still to "1" after a "SetNewFieldValue" to null ?