Search in sources :

Example 1 with TestSuite

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"));
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Test(org.junit.Test)

Example 2 with TestSuite

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"));
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Test(org.junit.Test)

Example 3 with TestSuite

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"));
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Test(org.junit.Test)

Example 4 with TestSuite

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));
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Test(org.junit.Test)

Example 5 with TestSuite

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());
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Test(org.junit.Test)

Aggregations

TestSuite (com.hazelcast.simulator.coordinator.TestSuite)12 Test (org.junit.Test)11 TestCase (com.hazelcast.simulator.common.TestCase)4 Coordinator (com.hazelcast.simulator.coordinator.Coordinator)1 RcTestRunOperation (com.hazelcast.simulator.coordinator.operations.RcTestRunOperation)1