fix ts ng2 option test

This commit is contained in:
wing328
2017-07-08 22:37:45 +08:00
parent 4fdaf0d2b4
commit c1e1d23b05
3 changed files with 4 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ public class TypeScriptAngular2ClientOptionsProvider implements OptionsProvider
private static final String NMP_VERSION = "1.1.2";
private static final String NPM_REPOSITORY = "https://registry.npmjs.org";
public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false";
public static final String NG_VERSION = "2";
@Override
@@ -35,6 +36,7 @@ public class TypeScriptAngular2ClientOptionsProvider implements OptionsProvider
.put(TypeScriptAngular2ClientCodegen.SNAPSHOT, Boolean.FALSE.toString())
.put(TypeScriptAngular2ClientCodegen.WITH_INTERFACES, Boolean.FALSE.toString())
.put(TypeScriptAngular2ClientCodegen.NPM_REPOSITORY, NPM_REPOSITORY)
.put(TypeScriptAngular2ClientCodegen.NG_VERSION, NG_VERSION)
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
.build();
}

View File

@@ -13,7 +13,6 @@ public class TypeScriptAngularClientOptionsProvider implements OptionsProvider {
public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase";
public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false";
@Override
public String getLanguage() {
return "typescript-angular";

View File

@@ -30,6 +30,8 @@ public class TypeScriptAngular2ClientOptionsTest extends AbstractOptionsTest {
times = 1;
clientCodegen.setModelPropertyNaming(TypeScriptAngularClientOptionsProvider.MODEL_PROPERTY_NAMING_VALUE);
times = 1;
clientCodegen.setNgVersion(TypeScriptAngular2ClientOptionsProvider.NG_VERSION);
times = 1;
clientCodegen.setSupportsES6(Boolean.valueOf(TypeScriptAngularClientOptionsProvider.SUPPORTS_ES6_VALUE));
times = 1;
}};