Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if testTemplatesSourceFolder is valid and needed #1666

Open
jan-vcapgemini opened this issue Apr 3, 2023 · 0 comments
Open

Check if testTemplatesSourceFolder is valid and needed #1666

jan-vcapgemini opened this issue Apr 3, 2023 · 0 comments

Comments

@jan-vcapgemini
Copy link
Collaborator

Check if this test is still needed:

@Test
public void testTemplatesSourceFolder() {
// given
TemplatesConfigurationReader target = new TemplatesConfigurationReader(new File(testFileRootPath).toPath(),
"valid_source_folder");
Trigger trigger = new Trigger("", "asdf", "", Charset.forName("UTF-8"), new LinkedList<Matcher>(),
new LinkedList<ContainerMatcher>());
// when
Map<String, Template> templates = target.loadTemplates(trigger);
// then
assertThat(templates).isNotNull().hasSize(6);
String templateIdFooClass = "prefix_FooClass.java";
Template templateFooClass = templates.get(templateIdFooClass);
assertThat(templateFooClass).isNotNull();
assertThat(templateFooClass.getName()).isEqualTo(templateIdFooClass);
assertThat(templateFooClass.getRelativeTemplatePath()).isEqualTo("foo/FooClass.java.ftl");
assertThat(templateFooClass.getUnresolvedTargetPath()).isEqualTo("src/main/java/foo/FooClass.java");
assertThat(templateFooClass.getMergeStrategy()).isNull();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant