Package fi.tut.mei.ontologyClient.model
Class CapabilityLibraryTest
- java.lang.Object
-
- fi.tut.mei.ontologyClient.model.CapabilityLibraryTest
-
- Direct Known Subclasses:
CapabilityTest
,CombinationPossibilityTest
,OntologyCreatorTest
,ProcessTaxanomyTest
,ResourceCombinationTest
,ResourceTest
public class CapabilityLibraryTest extends Object
- Author:
- hylli, trinh
-
-
Field Summary
Fields Modifier and Type Field Description protected static Client
client
protected static String
TEST_RESOURCE_LOCATION
protected static String
TEST_RESOURCE_ONTOLOGY_LOCATION
protected String
TEST_SEPARATOR
-
Constructor Summary
Constructors Constructor Description CapabilityLibraryTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
deleteFile(String location)
Deletes the file at the given location if it existsprotected <T extends Collection<Capability>>
List<String>getListCapabilityNames(T list)
get list capability namesvoid
setUp()
static void
setUpBeforeClass()
void
tearDown()
static void
tearDownAfterClass()
protected void
testCapabilityParams(String name, List<ResourceCapability> resourceCapabilities, Map<String,Map<String,String>> expectedParamVals, Map<String,Map<String,List<String>>> expectedParamObjVals)
test content of capabilities parametersprotected void
testResourceCapabilities(String name, List<ResourceCapability> resourceCapabilities, List<String> expectedCapabilities)
check if resource capabilities are samevoid
testSearchCapability()
-
-
-
Field Detail
-
TEST_RESOURCE_LOCATION
protected static final String TEST_RESOURCE_LOCATION
- See Also:
- Constant Field Values
-
TEST_RESOURCE_ONTOLOGY_LOCATION
protected static final String TEST_RESOURCE_ONTOLOGY_LOCATION
- See Also:
- Constant Field Values
-
TEST_SEPARATOR
protected final String TEST_SEPARATOR
- See Also:
- Constant Field Values
-
client
protected static Client client
-
-
Method Detail
-
testSearchCapability
public void testSearchCapability()
-
testResourceCapabilities
protected void testResourceCapabilities(String name, List<ResourceCapability> resourceCapabilities, List<String> expectedCapabilities)
check if resource capabilities are same- Parameters:
name
- name of blueprint or individual deviceresourceCapabilities
- resource capabilitiesexpectedCapabilities
- expected capabilities
-
testCapabilityParams
protected void testCapabilityParams(String name, List<ResourceCapability> resourceCapabilities, Map<String,Map<String,String>> expectedParamVals, Map<String,Map<String,List<String>>> expectedParamObjVals)
test content of capabilities parameters- Parameters:
name
- name of blueprint or individual device or capability combinationresourceCapabilities
- list of resource capabilitiesexpectedParamVals
- expected parameter valuesexpectedParamObjVals
- expected parameter object values
-
getListCapabilityNames
protected <T extends Collection<Capability>> List<String> getListCapabilityNames(T list)
get list capability names- Parameters:
list
- of capabilities- Returns:
- list of capability names
-
deleteFile
protected static void deleteFile(String location)
Deletes the file at the given location if it exists- Parameters:
location
- File path.
-
-