Class KodexServiceTest
- java.lang.Object
-
- test.de.iip_ecosphere.platform.security.services.kodex.KodexServiceTest
-
public class KodexServiceTest extends java.lang.ObjectTests the KODEX service. The utilized JSON framework is just for testing, no production use!- Author:
- Holger Eichelberger, SSE
-
-
Constructor Summary
Constructors Constructor Description KodexServiceTest()
-
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.KodexService<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.voidtestKodexService()Tests the KODEX service.
-
-
-
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.KodexService<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
-
testKodexService
public void testKodexService() throws java.io.IOException, java.util.concurrent.ExecutionExceptionTests the KODEX service.- Throws:
java.util.concurrent.ExecutionException- in case of service execution failuresjava.io.IOException- in case of I/O related problems
-
-