>********************************************************************** >DEFINE CLASS TestConvert AS FxuTestCase OF FxuTestCase.prg > ********************************************************************** > > #IFNDEF CRLF > #DEFINE CRLF CHR(13) + CHR(10) > #ENDIF > > #IF .F. > LOCAL THIS AS TestConvert OF TestConvert.PRG > #ENDIF > > icTestPrefix = "Test" > ioObjectToTest = .NULL. > > ******************************************************************** > FUNCTION SETUP > THIS.ioObjectToTest = NEWOBJECT("Convert", "Convert.prg") > ENDFUNC > > ******************************************************************** > FUNCTION TearDown > This.ioObjectToTest = .NULL. > ENDFUNC > > ******************************************************************** > FUNCTION TestObjectCreated() > THIS.AssertNotNull("The Convert object was not created.", ; > THIS.ioObjectToTest) > ENDFUNC > > ******************************************************************** > FUNCTION TestGetEmptyValue() > WITH This.ioObjectToTest As Convert of Convert.prg > This.Assertequals("GetEmptyValue('C') failed to return an empty character", ; > '', .GetEmptyValue('C')) > This.Assertequals("GetEmptyValue('M') failed to return an empty character", ; > '', .GetEmptyValue('C')) > > This.Asserttrue("GetEmptyValue('O') failed to return .NULL.", ; > ISNULL(.GetEmptyValue('O'))) > * etc. > ENDWITH > ENDFUNC > > ******************************************************************** > FUNCTION TestGetTypeCode() > WITH This.ioObjectToTest As Convert of Convert.prg > This.Assertequals("GetTypeCode('') failed to return 'C'", ; > 'C', .GetTypeCode('')) > * etc. > ENDWITH > ENDFUNC > > *** SEVERAL OTHER TEST FUNCTIONS REMOVED > >ENDDEFINE >