public class TestDataHelper
extends java.lang.Object
Constructor and Description |
---|
TestDataHelper(BETestEngine engine)
Create a new instance of TestDataHelper
|
TestDataHelper(java.lang.String projPath,
TypeManager mgr)
Create a new instance of TestDataHelper
|
Modifier and Type | Method and Description |
---|---|
Concept |
createConceptFromJSON(java.lang.String instanceURI,
java.lang.String json) |
java.util.List |
createConceptsFromTestData(java.lang.String resourcePath)
Creates a List of Concept instances from the specified test data file
|
Event |
createEventFromJSON(java.lang.String eventURI,
java.lang.String json) |
java.util.List |
createEventsFromTestData(java.lang.String resourcePath)
Creates a List of Event instances from the specified test data file
|
java.util.List |
createScorecardsFromTestData(java.lang.String resourcePath)
Creates a List of Concept (Scorecard) instances from the specified test data file
|
public TestDataHelper(java.lang.String projPath, TypeManager mgr)
projPath
- The path to the projectmgr
- The TypeManager from the BETestEnginepublic TestDataHelper(BETestEngine engine)
engine
- The BETestEngine used during the unit test runpublic Event createEventFromJSON(java.lang.String eventURI, java.lang.String json)
eventURI
- The URI of the Event being created (i.e. '/Events/PromotionalEvent')json
- The JSON string describing the Event's properties."{\"PromotionalEvent\":{\"PriceAdjustment\":-250.0,\"SKU\":1234}}"
java.lang.Exception
public Concept createConceptFromJSON(java.lang.String instanceURI, java.lang.String json)
instanceURI
- The URI of the Concept being created (i.e. '/Concepts/Person')json
- The JSON string describing the Concept's properties."{\"Person\":{\"Age\":30,\"Name\":\"Jon\"}}"
java.lang.Exception
public java.util.List createConceptsFromTestData(java.lang.String resourcePath)
resourcePath
- The project relative path of the Concept data file (i.e. '/TestData/InventoryItem')java.lang.Exception
public java.util.List createScorecardsFromTestData(java.lang.String resourcePath)
resourcePath
- The project relative path of the Concept/Scorecard data file (i.e. '/TestData/InventoryItem')java.lang.Exception
public java.util.List createEventsFromTestData(java.lang.String resourcePath)
resourcePath
- The project relative path of the Event data file (i.e. '/TestData/PromotionalEvent')java.lang.Exception