Class ServiceMgrAndDescriptorTest
java.lang.Object
test.de.iip_ecosphere.platform.services.spring.AbstractTest
test.de.iip_ecosphere.platform.services.spring.ServiceMgrAndDescriptorTest
Tests selected service manager functionality based on simplified instances of a service manager loaded from
a descriptor file.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classA mocking service manager for a given service artifact. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertFunctionDef(String expected, de.iip_ecosphere.platform.services.ServiceManager mgr, String... serviceId) Asserts a function definition.(package private) static de.iip_ecosphere.platform.services.ServiceManagercreateServiceManager(File descriptor) Creates a simple service manager from loading a YAML file.voidTestsSpringCloudServiceManager.addAppId(String, List).voidTestsSpringCloudServiceDescriptor.instantiate(String)withAbstractServiceManager.determineExternalConnections(ServiceManager, String...).voidTestsAbstractServiceManager.determineInternalConnections(ServiceManager, String...)in combination withSpringCloudServiceDescriptor.toFunctionDefinition(Set).voidTestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).voidTestsSpringCloudServiceManager.determineSpringConditionals(ServiceManager, String...).voidTestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).
-
Constructor Details
-
ServiceMgrAndDescriptorTest
public ServiceMgrAndDescriptorTest()
-
-
Method Details
-
createServiceManager
static de.iip_ecosphere.platform.services.ServiceManager createServiceManager(File descriptor) throws IOException Creates a simple service manager from loading a YAML file. Only basic operations referring to the loaded artifact descriptor and the contained services are implemented.- Parameters:
descriptor- the descriptor to load- Returns:
- the service manager instance
- Throws:
IOException- if the descriptor cannot be loaded for some reason
-
assertFunctionDef
private static void assertFunctionDef(String expected, de.iip_ecosphere.platform.services.ServiceManager mgr, String... serviceId) Asserts a function definition.- Parameters:
expected- the expected resultmgr- the service manager instanceserviceId- the service ids to operate on
-
testInternalConnections
TestsAbstractServiceManager.determineInternalConnections(ServiceManager, String...)in combination withSpringCloudServiceDescriptor.toFunctionDefinition(Set).- Throws:
IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testSpringConditionals
TestsSpringCloudServiceManager.determineSpringConditionals(ServiceManager, String...).- Throws:
IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testOptions
TestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).- Throws:
IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testTopLevel
TestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).- Throws:
IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testAppId
public void testAppId()TestsSpringCloudServiceManager.addAppId(String, List). -
testInstantiate
TestsSpringCloudServiceDescriptor.instantiate(String)withAbstractServiceManager.determineExternalConnections(ServiceManager, String...).- Throws:
IOException- shall not occur
-