use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.
the class TestSuiteTest method loadTestSuite_multipleCases.
@Test
public void loadTestSuite_multipleCases() throws Exception {
String txt = "atomicLongTest@class=AtomicLong" + NEW_LINE + "atomicLongTest@threadCount=10" + NEW_LINE + "atomicBooleanTest@class=AtomicBoolean" + NEW_LINE + "atomicBooleanTest@threadCount=20";
TestSuite testSuite = new TestSuite(txt);
assertEquals(2, testSuite.size());
TestCase atomicLongTestCase = testSuite.getTestCase("atomicLongTest");
assertEquals("atomicLongTest", atomicLongTestCase.getId());
assertEquals("AtomicLong", atomicLongTestCase.getClassname());
assertEquals("10", atomicLongTestCase.getProperty("threadCount"));
TestCase atomicBooleanTestCase = testSuite.getTestCase("atomicBooleanTest");
assertEquals("atomicBooleanTest", atomicBooleanTestCase.getId());
assertEquals("AtomicBoolean", atomicBooleanTestCase.getClassname());
assertEquals("20", atomicBooleanTestCase.getProperty("threadCount"));
}
use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.
the class TestSuiteTest method loadTestSuite_singleTestWithTestName.
@Test
public void loadTestSuite_singleTestWithTestName() throws Exception {
String txt = "atomicLongTest@class=AtomicLong" + NEW_LINE + "atomicLongTest@threadCount=10";
TestSuite testSuite = new TestSuite(txt);
assertEquals(1, testSuite.size());
TestCase testCase = testSuite.getTestCaseList().get(0);
assertEquals("atomicLongTest", testCase.getId());
assertEquals("AtomicLong", testCase.getClassname());
assertEquals("10", testCase.getProperty("threadCount"));
}
use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.
the class TestSuiteTest method loadTestSuite_singleTest.
@Test
public void loadTestSuite_singleTest() throws Exception {
String txt = "class=AtomicLong" + NEW_LINE + "threadCount=10";
TestSuite testSuite = new TestSuite(txt);
assertEquals(1, testSuite.size());
TestCase testCase = testSuite.getTestCaseList().get(0);
assertNotNull(testCase);
assertEquals("AtomicLong", testCase.getClassname());
assertNotNull(testCase.toString());
Map<String, String> properties = testCase.getProperties();
assertEquals("10", properties.get("threadCount"));
}
use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.
the class TestSuiteTest method getTestCase_null.
@Test
public void getTestCase_null() throws Exception {
TestSuite testSuite = new TestSuite("class=Foo");
assertNull(testSuite.getTestCase(null));
}
use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.
the class TestSuiteTest method getTestCase_toString.
@Test
public void getTestCase_toString() throws Exception {
TestSuite testSuite = new TestSuite("class=Foo");
assertNotNull(testSuite.toString());
}
Aggregations