use of com.github.noconnor.junitperf.JUnitPerfTest in project vorto by eclipse.
the class BinaryMappingLoadTest method builtInConverter2.
@Test
@JUnitPerfTest(threads = THREAD_AMOUNT_2, durationMs = TEST_DURATION_2, rampUpPeriodMs = RAMP_PERIOD, warmUpMs = WARMUP_DURATION_2, maxExecutionsPerSecond = EXECUTIONS_PER_SECOND_2)
public void builtInConverter2() throws Exception {
InfomodelValue mappedOutput = testCaseOneMapper.mapSource(gson.fromJson(testCaseOneJson, Object.class));
assertEquals("20", new String((byte[]) mappedOutput.get("button").getStatusProperty("digital_input_state").get().getValue()));
}
use of com.github.noconnor.junitperf.JUnitPerfTest in project vorto by eclipse.
the class BinaryMappingLoadTest method builtInConverter3.
@Test
@JUnitPerfTest(threads = THREAD_AMOUNT_3, durationMs = TEST_DURATION_3, rampUpPeriodMs = RAMP_PERIOD, warmUpMs = WARMUP_DURATION_3, maxExecutionsPerSecond = EXECUTIONS_PER_SECOND_3)
public void builtInConverter3() throws Exception {
InfomodelValue mappedOutput = testCaseOneMapper.mapSource(gson.fromJson(testCaseOneJson, Object.class));
assertEquals("20", new String((byte[]) mappedOutput.get("button").getStatusProperty("digital_input_state").get().getValue()));
}
use of com.github.noconnor.junitperf.JUnitPerfTest in project vorto by eclipse.
the class BinaryMappingLoadTest method doubleNestedConverter4.
@Test
@JUnitPerfTest(threads = THREAD_AMOUNT_4, durationMs = TEST_DURATION_4, rampUpPeriodMs = RAMP_PERIOD, warmUpMs = WARMUP_DURATION_4, maxExecutionsPerSecond = EXECUTIONS_PER_SECOND_4)
public void doubleNestedConverter4() throws Exception {
InfomodelValue mapped = testCaseTwoMapper.mapSource(testCaseTwoInput);
assertEquals(20.00, mapped.get("temperature").getStatusProperty("value").get().getValue());
assertEquals(88.19, mapped.get("humidity").getStatusProperty("value").get().getValue());
}
use of com.github.noconnor.junitperf.JUnitPerfTest in project vorto by eclipse.
the class BinaryMappingLoadTest method doubleNestedConverter2.
@Test
@JUnitPerfTest(threads = THREAD_AMOUNT_2, durationMs = TEST_DURATION_2, rampUpPeriodMs = RAMP_PERIOD, warmUpMs = WARMUP_DURATION_2, maxExecutionsPerSecond = EXECUTIONS_PER_SECOND_2)
public void doubleNestedConverter2() throws Exception {
InfomodelValue mapped = testCaseTwoMapper.mapSource(testCaseTwoInput);
assertEquals(20.00, mapped.get("temperature").getStatusProperty("value").get().getValue());
assertEquals(88.19, mapped.get("humidity").getStatusProperty("value").get().getValue());
}
use of com.github.noconnor.junitperf.JUnitPerfTest in project vorto by eclipse.
the class BinaryMappingLoadTest method doubleNestedConverter1.
// // Test Case 2 - Double Nested Converter Functions (Built-in (Java) + Javascript)
@Test
@JUnitPerfTest(threads = THREAD_AMOUNT_1, durationMs = TEST_DURATION_1, rampUpPeriodMs = RAMP_PERIOD, warmUpMs = WARMUP_DURATION_1, maxExecutionsPerSecond = EXECUTIONS_PER_SECOND_1)
public void doubleNestedConverter1() throws Exception {
InfomodelValue mapped = testCaseTwoMapper.mapSource(testCaseTwoInput);
assertEquals(20.00, mapped.get("temperature").getStatusProperty("value").get().getValue());
assertEquals(88.19, mapped.get("humidity").getStatusProperty("value").get().getValue());
}
Aggregations