Updated the testing for DRE

Fixed the errors when running the test
This commit is contained in:
Marcus Rockwell 2023-10-05 15:32:40 -05:00
parent 0be90e3791
commit f0af15ee2d
4 changed files with 3613 additions and 35 deletions

View File

@ -16,12 +16,13 @@ import trick.common.CheckApplicationProperties;
* Test DreApplication life cycle.
*
* @author hchen
* @intern mrockwell2
*
*/
public class DreApplicationTest {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
public static void setUpBeforeClass() throws Exception {
WaitForDreApplication.launchAndWait(WaitForDreApplication.class);
}
@ -30,7 +31,7 @@ public class DreApplicationTest {
}
@Before
public void setUp() throws Exception {
public void setUp() throws Exception {
}
@After
@ -38,7 +39,7 @@ public class DreApplicationTest {
}
@Test
public void testReady() {
public void testReady() {
assertTrue("DreApplicationTest is not ready yet!", application().isReady());
}

View File

@ -29,7 +29,10 @@ public class WaitForDreApplication extends DreApplication {
*/
public static void launchAndWait(Class<? extends WaitForDreApplication> applicationClass) {
synchronized(lock) {
sieResourcePath ="resources" + java.io.File.separator + "S_sie.resource";
// Set path to S_sie.resource (src/test/resources/S_sie.resource)
final String sep = java.io.File.separator;
sieResourcePath = String.format("src%1$stest%1$sresources%1$sS_sie.resource", sep);
Application.launch(applicationClass, new String[]{});
while(true) {
try {

View File

@ -1,31 +0,0 @@
package trick.test;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
public class Testing {
@BeforeClass
public static void beforeClassmethod() {
System.out.println("Hi welcome in Before Class Method");
}
@Before
public void beforemethod() {
System.out.println("Hello there welcome in Before Test Case strategy ");
}
@Test
public void Test(){
System.out.println("Welcome in First Test");
int num = 5;
assertTrue(num == 5);
}
@After
public void aftermethod() {
System.out.println("Hi welcome in After Test Case");
}
@AfterClass
public static void afterClassmethod() {
System.out.println("Hi welcome in After Class");
}
}

File diff suppressed because it is too large Load Diff