objMyCFC.getCreatedDate() returns a coldfusion date primitive. When represented as a string, its value is "2005-08-30 16:12:12.13". The expected argument to assertEquals is a string representing a valid date and will be converted to an actual date primitive by the cf runtime when passed to a function whose argument specifies the "date" type.
Both of these comparisons fail when they really shouldn't. It seems like the assert library needs more type awareness.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1750338
Originator: YES
Here's another example regarding dates:
assertEquals( "CreatedDate", "2005-08-30 16:12:12.130", objMyCFC.getCreatedDate() );
assertEquals( "CreatedDate", "2005-08-30 16:12:12.13", objMyCFC.getCreatedDate() );
objMyCFC.getCreatedDate() returns a coldfusion date primitive. When represented as a string, its value is "2005-08-30 16:12:12.13". The expected argument to assertEquals is a string representing a valid date and will be converted to an actual date primitive by the cf runtime when passed to a function whose argument specifies the "date" type.
Both of these comparisons fail when they really shouldn't. It seems like the assert library needs more type awareness.