source: java2python/src/test/java/tudelft/utilities/j2p/PersonJsonTest.java@ 354

Last change on this file since 354 was 354, checked in by wouter, 2 years ago

#112 commit before trying to run new zip()

File size: 873 bytes
Line 
1package tudelft.utilities.j2p;
2
3import java.io.File;
4import java.io.IOException;
5
6import org.junit.Test;
7
8public class PersonJsonTest extends PyTest {
9
10 private static final String TESTDIR = "src/test/java/";
11 private static final String FULLNAME = "testcode/PersonJson.java";
12
13 @Test
14 public void test() throws IOException, ClassNotFoundException {
15 System.out.println("TRANSLATION:");
16 System.out.println(translate(TESTDIR + FULLNAME));
17 }
18
19 @Test
20 public void runInPython() throws Exception {
21
22// List<String> res = runPython(translate(TESTDIR + FULLNAME),
23// FULLNAME.replace(".java", ".py"));
24 File zipfile = zip(translate(TESTDIR + FULLNAME),
25 FULLNAME.split("/")[0]);
26 System.out.println("zip file at " + zipfile);
27// assertEquals(Arrays.asList("Person[Kees,25]\n"
28// + "{\"PersonJson\":{\"name\":\"Kees\",\"age\":25}}\n" + "true"),
29// res);
30 }
31
32}
Note: See TracBrowser for help on using the repository browser.