.
This commit is contained in:
+19
@@ -171,4 +171,23 @@ class MarketingAnalysisServiceChartPlacementTest {
|
||||
assertTrue(Pattern.compile("(?m)^```json:segmentsChannelMatrix$").matcher(out).find(),
|
||||
"Opening fence line must be exactly ```json:<key> with no leading spaces");
|
||||
}
|
||||
|
||||
@Test
|
||||
void replaceChartPlaceholders_shouldRemoveGenericChartDotsPlaceholder() throws Exception {
|
||||
Method m = MarketingAnalysisService.class.getDeclaredMethod("replaceChartPlaceholders", String.class,
|
||||
Map.class);
|
||||
m.setAccessible(true);
|
||||
|
||||
String report = ""
|
||||
+ "## I. Краткое резюме\n"
|
||||
+ "Текст перед.\n"
|
||||
+ "[[CHART_...]]\n"
|
||||
+ "Текст после.\n";
|
||||
|
||||
// Even if chartsData is empty, generic placeholders must be removed.
|
||||
String out = (String) m.invoke(marketingAnalysisService, report, new HashMap<String, Object>());
|
||||
|
||||
assertFalse(out.contains("[[CHART_...]]"),
|
||||
"Generic placeholder [[CHART_...]] must be removed from fullAnalysis");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user