Dashboard > GreenPepper Demo > Home > Collection
  GreenPepper Demo Log In View a printable version of the current page.  
  Collection
Added by admin, last edited by Francois Denommee on Mar 05, 2009  (view change)
Labels: 
(None)

Begin Info
End Info
Import
com.greenpepper.confluence.demo.collection
GreenPepper.Confluence.Demo.Collection

Setup Example

Using the SetupInterpreter, we populate a list of province.

Setup Canada Province Codes
Name Code
ALBERTA AB
BRITISH COLUMBIA BC
MANITOBA MB
NEW BRUNSWICK NB
NEWFOUNDLAND and LABRADOR NL
NOVA SCOTIA NS
NUNAVUT NU
ONTARIO ON
PRINCE EDWARD ISLAND PE
QUEBEC QC
SASKATCHEWAN SK

From this list, we intentionnally omit the Yukon province to show the behavior of the DoSetupInterpreter.

Using the DoSetupInterpreter, the Yukon province will be inserted but others won't. This is because the insertProvinceWithCode method will throw an exception when we are trying to insert duplicate province data. From the row causing the exception, all the remaining rows will be skipped.

Do Setup Canada Province Codes
insert province YUKON with code YT
insert province ALBERTA with code AB
insert province BRITISH COLUMBIA with code BC

List Of

Using the ListOfInterpreter, the requirement list should be the same as the SUD list (order is important).

list of Canada Province Codes
Name Code
ALBERTA AB
BRITISH COLUMBIA BC
MANITOBA MB
NEW BRUNSWICK NB
NEWFOUNDLAND and LABRADOR NL
NOVA SCOTIA NS
NUNAVUT NU
ONTARIO ON
PRINCE EDWARD ISLAND PE
QUEBEC QC
SASKATCHEWAN SK
YUKON YT

Set Of

Using the SetOfInterpreter, the requirement set should be the same as the SUD set (order is NOT important).

set of Canada Province Codes
Name Code
YUKON YT
ALBERTA AB
BRITISH COLUMBIA BC
MANITOBA MB
SASKATCHEWAN SK
NEWFOUNDLAND and LABRADOR NL
NOVA SCOTIA NS
NUNAVUT NU
PRINCE EDWARD ISLAND PE
QUEBEC QC
ONTARIO ON
NEW BRUNSWICK NB

Subset Of

Using the SubsetOfInterpreter, the requirement set should be a subset of the SUD set (subset of the full list).

subset of Canada Province Codes
Name Code
BRITISH COLUMBIA BC
QUEBEC QC

Superset Of

Using the SupersetOfInterpreter, the requirement set should be a superset of the SUD set (all items in the list should be present, extra items are ignored).

superset of Canada Province Codes
Name Code
ALBERTA AB
BRITISH COLUMBIA BC
MANITOBA MB
NEW BRUNSWICK NB
NEWFOUNDLAND and LABRADOR NL
NOVA SCOTIA NS
NUNAVUT NU
ONTARIO ON
PRINCE EDWARD ISLAND PE
QUEBEC QC
SASKATCHEWAN SK
YUKON YT
Other Province OP

Source Code

Begin Info

CanadaProvinceCodesFixture.java


Country.java
Province.java

End Info
CanadaProvinceCodesFixture.java (GreenPepper Demo)
Country.java (GreenPepper Demo)
Province.java (GreenPepper Demo)

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators