Last change
on this file was 896, checked in by wouter, 5 months ago |
#310 moved GetResourcesTest to junit-t because this test is so much easier if we have junit translator and package translation. junit tests now require @RunWith annotation for proper translation. Added more translators
|
File size:
617 bytes
|
Line | |
---|
1 | package tudelft.utilities.j2p.t.unittest;
|
---|
2 |
|
---|
3 | import com.github.javaparser.ast.type.Type;
|
---|
4 |
|
---|
5 | import tudelft.utilities.j2p.formatting.ExpressionLine;
|
---|
6 | import tudelft.utilities.j2p.t.TranslationException;
|
---|
7 | import tudelft.utilities.j2p.t.java.lang.Object;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * This is a translator for the "fake" org.junit.TestCase class that helps us
|
---|
11 | * make the testcase extend "unittest.TestCase" in python.
|
---|
12 | *
|
---|
13 | */
|
---|
14 | public class TestCase extends Object {
|
---|
15 | @Override
|
---|
16 | public ExpressionLine getTypeExpr(Type type) throws TranslationException {
|
---|
17 | return new ExpressionLine("TestCase")
|
---|
18 | .withImport("from unittest import TestCase");
|
---|
19 | }
|
---|
20 |
|
---|
21 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.