Class KodexRestServiceTest
- java.lang.Object
-
- test.de.iip_ecosphere.platform.security.services.kodex.KodexRestServiceTest
-
public class KodexRestServiceTest extends java.lang.ObjectTests the KODEX local server. The utilized REST framework is just for testing, no production use!- Author:
- Marcel Nöhre
-
-
Constructor Summary
Constructors Constructor Description KodexRestServiceTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private longcalcRuntime()Calculate the runtime.private voidcreateExcelFile(java.util.ArrayList<java.lang.Long[]> runtimeList)Save runtime results as excel-file.private longgetCount()Returns counter of the tuple.private longgetEndTime()Returns the end time of the service.private longgetStartTime()Returns the start time of the service.private static voidprocess(de.iip_ecosphere.platform.security.services.kodex.KodexRestService<InData,OutData> service, InData data)Processesdataonserviceand logs the sent input.private voidsetCount(long newCount)Set the new count of the tuple.private voidsetEndTime(long end)Set the new end time of the service.private voidsetStartTime(long start)Set the start time of the service.voidtestKodexRestService()Tests the KODEX local server.voidtestMultiKodexRestService()TestsMultiKodexRestService.
-
-
-
Method Detail
-
setStartTime
private void setStartTime(long start)
Set the start time of the service.- Parameters:
start- the start time
-
setEndTime
private void setEndTime(long end)
Set the new end time of the service.- Parameters:
end- the end time
-
setCount
private void setCount(long newCount)
Set the new count of the tuple.- Parameters:
newCount- the count value
-
getStartTime
private long getStartTime()
Returns the start time of the service.- Returns:
- startTime
-
getEndTime
private long getEndTime()
Returns the end time of the service.- Returns:
- endTime
-
getCount
private long getCount()
Returns counter of the tuple.- Returns:
- endTime
-
calcRuntime
private long calcRuntime()
Calculate the runtime.- Returns:
- the runtime
-
createExcelFile
private void createExcelFile(java.util.ArrayList<java.lang.Long[]> runtimeList) throws java.io.IOExceptionSave runtime results as excel-file.- Parameters:
runtimeList- list of runtime measures- Throws:
java.io.IOException- if creating the file fails
-
process
private static void process(de.iip_ecosphere.platform.security.services.kodex.KodexRestService<InData,OutData> service, InData data) throws java.io.IOException
Processesdataonserviceand logs the sent input.- Parameters:
service- the service instancedata- the input data- Throws:
java.io.IOException- if processing/serializing the input data fails
-
testKodexRestService
public void testKodexRestService() throws java.io.IOException, java.util.concurrent.ExecutionExceptionTests the KODEX local server.- Throws:
java.io.IOException- if reading test data fails, shall not occurjava.util.concurrent.ExecutionException- shall not occur
-
testMultiKodexRestService
public void testMultiKodexRestService() throws java.util.concurrent.ExecutionExceptionTestsMultiKodexRestService.- Throws:
java.util.concurrent.ExecutionException- shall not occur
-
-