use of cz.habarta.typescript.generator.EnumTest.Direction in project typescript-generator by vojtechhabarta.
the class EnumConstantsExtensionTest method testInTypeScriptGenerator.
@Test
public void testInTypeScriptGenerator() {
final Settings settings = new Settings();
settings.newline = "\n";
settings.outputFileType = TypeScriptFileType.implementationFile;
settings.outputKind = TypeScriptOutputKind.global;
settings.jsonLibrary = JsonLibrary.jackson2;
settings.extensions.add(new EnumConstantsExtension());
final String actual = new TypeScriptGenerator(settings).generateTypeScript(Input.from(Direction.class));
Assert.assertTrue(actual.contains("const Direction"));
Assert.assertTrue(actual.contains("North"));
}
Aggregations