public class ArtifactInfoTest extends Object
Validator.| Constructor and Description |
|---|
ArtifactInfoTest() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
assertEndpoint(de.iip_ecosphere.platform.services.spring.yaml.YamlEndpoint endpoint,
int port,
String host)
Asserts properties of an
YamlEndpoint. |
private static void |
assertProcess(de.iip_ecosphere.platform.services.spring.yaml.YamlProcess process,
String artifact,
String executable,
boolean started,
int waitTime,
String... cmdArgs)
Asserts
YamlProcess information. |
private static void |
assertRelation(de.iip_ecosphere.platform.services.spring.yaml.YamlRelation relation,
String channel,
int port,
String host)
Asserts properties of a
YamlRelation. |
private static void |
assertServiceBasics(de.iip_ecosphere.platform.services.spring.yaml.YamlService service,
String id,
String name,
String version,
String descr)
Asserts basic properties of a
YamlService. |
private static void |
assertServiceCharacteristics(de.iip_ecosphere.platform.services.spring.yaml.YamlService service,
boolean deployable,
de.iip_ecosphere.platform.services.environment.ServiceKind kind)
Asserts additional characteristics of a
YamlService. |
private static void |
assertStringList(List<String> list,
String... expected)
Asserts a list of strings w.r.t.
|
private static Class<?> |
assertTypedData(de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor desc,
String id,
String name,
String description,
String type)
Asserts properties of a typed connector descriptor.
|
private static Class<?> |
assertTypedData(de.iip_ecosphere.platform.services.TypedDataDescriptor desc,
String name,
String description,
String type)
Asserts properties of a typed data descriptor.
|
void |
testFileDescriptorTest()
Tests
DescriptorTest. |
void |
testInvalidYaml()
Tests a structurally correct but invalid YAML file.
|
void |
testResolution()
Tests the class resolution.
|
void |
testYaml()
Tests the YAML reader.
|
public void testYaml()
throws IOException
IOException - shall not occurpublic void testResolution()
throws IOException
IOException - shall not occurprivate static Class<?> assertTypedData(de.iip_ecosphere.platform.services.TypedDataConnectorDescriptor desc, String id, String name, String description, String type)
desc - the connector descriptorid - the identifier of the descriptor (not tested if null)name - the name of the parameterdescription - the descriptiontype - the type (not tested if null)type was given and asserted)private static Class<?> assertTypedData(de.iip_ecosphere.platform.services.TypedDataDescriptor desc, String name, String description, String type)
desc - the data descriptorname - the name of the parameterdescription - the descriptiontype - the type (not tested if null)type was given and asserted)public void testInvalidYaml()
throws IOException
IOException - shall not occurprivate static void assertStringList(List<String> list, String... expected)
expected values.list - the listexpected - the expected valuesprivate static void assertServiceBasics(de.iip_ecosphere.platform.services.spring.yaml.YamlService service,
String id,
String name,
String version,
String descr)
YamlService.service - the service instance to be assertedid - the expected service idname - the expected service nameversion - the expected service versiondescr - the expected descriptionprivate static void assertServiceCharacteristics(de.iip_ecosphere.platform.services.spring.yaml.YamlService service,
boolean deployable,
de.iip_ecosphere.platform.services.environment.ServiceKind kind)
YamlService.service - the service instance to be asserteddeployable - whether it is expected that the service is deployablekind - the expected service kindprivate static void assertRelation(de.iip_ecosphere.platform.services.spring.yaml.YamlRelation relation,
String channel,
int port,
String host)
YamlRelation.relation - the relation to be assertedchannel - the expected channel name/idport - the port number to be used/substitutedhost - the host name to be used/substitutedprivate static void assertEndpoint(de.iip_ecosphere.platform.services.spring.yaml.YamlEndpoint endpoint,
int port,
String host)
YamlEndpoint.port - the port number to be used/substitutedhost - the host name to be used/substitutedendpoint - the endpoint to be assertedprivate static void assertProcess(de.iip_ecosphere.platform.services.spring.yaml.YamlProcess process,
String artifact,
String executable,
boolean started,
int waitTime,
String... cmdArgs)
YamlProcess information.process - the process to assertartifact - the expected artifactexecutable - the expected executablestarted - whether the process is marked as already startedwaitTime - the expected wait timecmdArgs - the expected command line argumentspublic void testFileDescriptorTest()
throws IOException
DescriptorTest.IOException - in case that descriptors/files cannot be readCopyright © 2022. All rights reserved.