mirror of
https://github.com/nasa/trick.git
synced 2025-04-19 00:27:00 +00:00
Updated the testing for DRE
Fixed the errors when running the test
This commit is contained in:
parent
0be90e3791
commit
f0af15ee2d
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
3605
trick_source/java/src/test/resources/S_sie.resource
Normal file
3605
trick_source/java/src/test/resources/S_sie.resource
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user