Class ServiceMgrAndDescriptorTest
- java.lang.Object
-
- test.de.iip_ecosphere.platform.services.spring.ServiceMgrAndDescriptorTest
-
public class ServiceMgrAndDescriptorTest extends java.lang.ObjectTests 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 Classes Modifier and Type Class Description private static classServiceMgrAndDescriptorTest.MockServiceManagerA mocking service manager for a given service artifact.
-
Constructor Summary
Constructors Constructor Description ServiceMgrAndDescriptorTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidassertFunctionDef(java.lang.String expected, de.iip_ecosphere.platform.services.ServiceManager mgr, java.lang.String... serviceId)Asserts a function definition.(package private) static de.iip_ecosphere.platform.services.ServiceManagercreateServiceManager(java.io.File descriptor)Creates a simple service manager from loading a YAML file.voidtestAppId()TestsSpringCloudServiceManager.addAppId(String, List).voidtestInternalConnections()TestsAbstractServiceManager.determineInternalConnections(ServiceManager, String...)in combination withSpringCloudServiceDescriptor.toFunctionDefinition(Set).voidtestOptions()TestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).voidtestSpringConditionals()TestsSpringCloudServiceManager.determineSpringConditionals(ServiceManager, String...).voidtestTopLevel()TestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).
-
-
-
Method Detail
-
createServiceManager
static de.iip_ecosphere.platform.services.ServiceManager createServiceManager(java.io.File descriptor) throws java.io.IOExceptionCreates 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:
java.io.IOException- if the descriptor cannot be loaded for some reason
-
assertFunctionDef
private static void assertFunctionDef(java.lang.String expected, de.iip_ecosphere.platform.services.ServiceManager mgr, java.lang.String... serviceId)Asserts a function definition.- Parameters:
expected- the expected resultmgr- the service manager instanceserviceId- the service ids to operate on
-
testInternalConnections
public void testInternalConnections() throws java.io.IOExceptionTestsAbstractServiceManager.determineInternalConnections(ServiceManager, String...)in combination withSpringCloudServiceDescriptor.toFunctionDefinition(Set).- Throws:
java.io.IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testSpringConditionals
public void testSpringConditionals() throws java.io.IOExceptionTestsSpringCloudServiceManager.determineSpringConditionals(ServiceManager, String...).- Throws:
java.io.IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testOptions
public void testOptions() throws java.io.IOExceptionTestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).- Throws:
java.io.IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testTopLevel
public void testTopLevel() throws java.io.IOExceptionTestsSpringCloudServiceManager.handleOptions(Map, ServiceManager, String...).- Throws:
java.io.IOException- if loading the test descriptor "ServiceMesh3Deployment.yml" fails
-
testAppId
public void testAppId()
TestsSpringCloudServiceManager.addAppId(String, List).
-
-