use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.
the class RegistryTest method testGetTests.
// @Test
// public void testRemoveTests() {
// TestSuite testSuite1 = new TestSuite()
// .addTest(new TestCase("Test1a"))
// .addTest(new TestCase("Test1b"));
// registry.addTests(testSuite1);
//
// TestSuite testSuite2 = new TestSuite()
// .addTest(new TestCase("Test2a"))
// .addTest(new TestCase("Test2b"));
// registry.addTests(testSuite2);
//
// registry.removeTests(testSuite1);
//
// assertEquals(2, registry.testCount());
// for (TestData testData : registry.getTests()) {
// assertSame(testSuite2, testData.getTestSuite());
// }
// }
@Test
public void testGetTests() {
TestSuite testSuite = new TestSuite();
testSuite.addTest(new TestCase("Test1"));
testSuite.addTest(new TestCase("Test2"));
testSuite.addTest(new TestCase("Test3"));
registry.addTests(testSuite);
Collection<TestData> tests = registry.getTests();
assertEquals(3, tests.size());
for (TestData testData : tests) {
assertTrue(testData.getTestCase().getId().startsWith("Test"));
}
}
use of com.hazelcast.simulator.coordinator.TestSuite in project hazelcast-simulator by hazelcast.
the class RegistryTest method testGetTest.
@Test
public void testGetTest() {
TestSuite testSuite = new TestSuite();
testSuite.addTest(new TestCase("Test1"));
testSuite.addTest(new TestCase("Test2"));
testSuite.addTest(new TestCase("Test3"));
registry.addTests(testSuite);
TestData testData = registry.getTest("Test2");
assertEquals(2, testData.getTestIndex());
assertEquals("Test2", testData.getTestCase().getId());
}
Aggregations