|
27 | 27 | import io.github.blueprintplatform.codegen.domain.model.value.tech.stack.TechStack; |
28 | 28 | import io.github.blueprintplatform.codegen.domain.port.out.artifact.GeneratedResource; |
29 | 29 | import io.github.blueprintplatform.codegen.domain.port.out.artifact.GeneratedTextResource; |
| 30 | +import io.github.blueprintplatform.codegen.testsupport.templating.NoopTemplateRenderer; |
30 | 31 | import java.nio.charset.StandardCharsets; |
31 | 32 | import java.nio.file.Path; |
32 | 33 | import java.util.ArrayList; |
@@ -160,26 +161,15 @@ void generate_hexagonalBasic_shouldGenerateSampleSources() { |
160 | 161 | .allMatch(model -> BASE_PACKAGE.equals(model.get("projectPackageName"))); |
161 | 162 | } |
162 | 163 |
|
163 | | - private static final class NoopTemplateRenderer implements TemplateRenderer { |
164 | | - |
165 | | - @Override |
166 | | - public GeneratedResource renderUtf8( |
167 | | - Path outPath, String templateName, Map<String, Object> model) { |
168 | | - return new GeneratedTextResource(outPath, "", StandardCharsets.UTF_8); |
169 | | - } |
170 | | - } |
171 | | - |
172 | 164 | private static final class RecordingTemplateRenderer implements TemplateRenderer { |
173 | 165 |
|
174 | | - private final List<Path> capturedOutPaths = new ArrayList<>(); |
175 | 166 | private final List<String> capturedTemplateNames = new ArrayList<>(); |
176 | 167 | private final List<Map<String, Object>> capturedModels = new ArrayList<>(); |
177 | 168 |
|
178 | 169 | @Override |
179 | 170 | public GeneratedResource renderUtf8( |
180 | 171 | Path outPath, String templateName, Map<String, Object> model) { |
181 | 172 |
|
182 | | - capturedOutPaths.add(outPath); |
183 | 173 | capturedTemplateNames.add(templateName); |
184 | 174 | capturedModels.add(model); |
185 | 175 |
|
|
0 commit comments