File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
typescript-generator-core/src/test/java/cz/habarta/typescript/generator Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ package cz .habarta .typescript .generator ;
2+
3+ import java .util .HashMap ;
4+
5+ import org .junit .Test ;
6+
7+ import static org .junit .Assert .assertEquals ;
8+
9+ public class MapExtensionTest {
10+
11+ @ Test
12+ public void testOrder1 () {
13+ final Settings settings = TestUtils .settings ();
14+ settings .sortDeclarations = true ;
15+ String expected = "" +
16+ "" + settings .newline +
17+ "interface A {" + settings .newline +
18+ " mapExt?: { [index: any]: any };" + settings .newline +
19+ "}" + settings .newline +
20+ "" + settings .newline +
21+ "" ;
22+ final String actualA = new TypeScriptGenerator (settings ).generateTypeScript (Input .from (A .class ));
23+ final String actualB = new TypeScriptGenerator (settings ).generateTypeScript (Input .from (B .class ));
24+
25+ assertEquals (expected , actualA );
26+ assertEquals (expected , actualB );
27+ }
28+
29+ public static class A {
30+ public MapExtension mapExt ;
31+ }
32+
33+ public static class B {
34+ public MapExtension <String > mapExt ;
35+ }
36+
37+ public static class MapExtension <T > extends HashMap <T , Long > {}
38+ }
You can’t perform that action at this time.
0 commit comments