DEFINE CLASS wwCollectionsTest as FxuTestCase OF FxuTestCase.prg


*** SETUP AND CONFIGURATION *** 

************************************************************************
*  Setup
****************************************
***  Function:
***    Assume:
***      Pass:
***    Return:
************************************************************************
FUNCTION Setup()

	*** Make sure libraries are loaded
	DO wwCollections
ENDFUNC
*   Setup

************************************************************************
*  TearDown
****************************************
***  Function:
***    Assume:
***      Pass:
***    Return:
************************************************************************
FUNCTION TearDown()

ENDFUNC
*   TearDown

************************************************************************
*  wwCollection()
****************************************
***  Function:
***    Assume:
***      Pass:
***    Return:
************************************************************************
FUNCTION wwCollection()

loCol = CREATEOBJECT("wwCollection")

loCol.Add("Company")
loCol.Add("PkField")
loCol.Add("pk")

lnIndex = loCol.GetIndex("Pk")
this.AssertTrue(lnIndex = 3)

this.MessageOut("Index PK: " + TRANSFORM(lnIndex))

lnIndex = loCol.GetIndex("pk")
this.MessageOut("Index PK: " + TRANSFORM(lnIndex))

ENDFUNC


************************************************************************
*  wwNameValueCollection()
****************************************
***  Function:
***    Assume:
***      Pass:
***    Return:
************************************************************************
FUNCTION wwNameValueCollection()

loCol = CREATEOBJECT("wwNameValueCollection")

loCol.Add("Company","Company_Column")
loCol.Add("PkField","pk_column")
loCol.Add("pk","pk_column2")

lnIndex = loCol.GetIndex("Pk")
this.AssertTrue(lnIndex = 3)

this.MessageOut("Index PK: " + TRANSFORM(lnIndex))

lnIndex = loCol.GetIndex("pk")
this.MessageOut("Index PK: " + TRANSFORM(lnIndex))

ENDFUNC

  FUNCTION testNewTest
	* 1. Change the name of the test to reflect its purpose. Test one thing only.
	* 2. Implement the test by removing these comments and the default assertion and writing your own test code.
  RETURN This.AssertNotImplemented()

  ENDFUNC


ENDDEFINE
