Class ServiceManagerTest

java.lang.Object
test.de.iip_ecosphere.platform.services.ServiceManagerTest

public class ServiceManagerTest extends Object
Tests ServiceManager.
Author:
Holger Eichelberger, SSE
  • Constructor Details

    • ServiceManagerTest

      public ServiceManagerTest()
  • Method Details

    • testMgr

      public void testMgr() throws ExecutionException, URISyntaxException
      Tests ServiceManager.
      Throws:
      ExecutionException - shall not occur
      URISyntaxException - shall not occur
    • testMgrAppId

      public void testMgrAppId() throws ExecutionException, URISyntaxException
      Tests basic application id related functions.
      Throws:
      ExecutionException - shall not occur in a successful run
      URISyntaxException - shall not occur in a successful run
    • testExternalConnections

      public void testExternalConnections() throws ExecutionException, URISyntaxException
      Tests AbstractServiceManager.determineExternalConnections(ServiceManager, String...).
      Throws:
      ExecutionException - shall not occur in a successful run
      URISyntaxException - shall not occur in a successful run
    • testInternalConnections

      public void testInternalConnections() throws ExecutionException, URISyntaxException
      Tests AbstractServiceManager.determineInternalConnections(ServiceManager, String...).
      Throws:
      ExecutionException - shall not occur in a successful run
      URISyntaxException - shall not occur in a successful run
    • testFunctionalConnections

      public void testFunctionalConnections() throws ExecutionException, URISyntaxException
      Tests AbstractServiceManager.determineInternalConnections(ServiceManager, String...).
      Throws:
      ExecutionException - shall not occur in a successful run
      URISyntaxException - shall not occur in a successful run
    • assertContains

      private static void assertContains(Set<de.iip_ecosphere.platform.services.AbstractServiceManager.TypedDataConnection> conn, String... cIds)
      Asserts that conn contains all cIds.
      Parameters:
      conn - the connect to check the ids for
      cIds - the connection ids to assert for
    • assertException

      static void assertException(ServiceManagerTest.WithExecutionException func)
      Asserts that an exception occurred, e.g., as func is currently not implemented.
      Parameters:
      func - the function to execute
    • testSortByDependencyBasic

      public void testSortByDependencyBasic()
      Basic tests for AbstractServiceManager.sortByDependency(List, Collection, Predicate, boolean).
    • testSortByDependency

      public void testSortByDependency() throws URISyntaxException
      Tests for AbstractServiceManager.sortByDependency(List, Collection, Predicate, boolean) with other services.
      Throws:
      URISyntaxException - shall not occur in a successful run
    • testSortByDependencyEnsemble

      public void testSortByDependencyEnsemble() throws URISyntaxException
      Tests for AbstractServiceManager.sortByDependency(List, Collection, Predicate, boolean) for ensembles.
      Throws:
      URISyntaxException - shall not occur
    • assertList

      static <T> void assertList(List<T> list, T... expected)
      Asserts the contents of a list with considering the sequence.
      Type Parameters:
      T - the element type
      Parameters:
      list - the list
      expected - the expected elements and sequence
    • assertCollection

      static <T> void assertCollection(Collection<T> collection, T... expected)
      Asserts the contents of a collection without considering the sequence.
      Type Parameters:
      T - the element type
      Parameters:
      collection - the collection
      expected - the expected elements