From c1d7b005d779f8dff10c29f2981880753efee445 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Mon, 29 Jan 2024 17:19:20 +0300 Subject: [PATCH] Add another test --- .../utils/markdown/MarkdownUtilsTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/com/epam/reportportal/utils/markdown/MarkdownUtilsTest.java b/src/test/java/com/epam/reportportal/utils/markdown/MarkdownUtilsTest.java index e4b98056..24e93b72 100644 --- a/src/test/java/com/epam/reportportal/utils/markdown/MarkdownUtilsTest.java +++ b/src/test/java/com/epam/reportportal/utils/markdown/MarkdownUtilsTest.java @@ -141,4 +141,17 @@ public void test_format_data_table_min_size_no_transpose() { List> table = Arrays.asList(Arrays.asList("var_a", "result"), Arrays.asList("2", "4")); assertThat(formatDataTable(table, 0), equalTo(MIN_ROW_WIDTH_EXPECTED_TABLE_NO_TRANSPOSE)); } + + //@formatter:off + public static final String MIN_ROW_WIDTH_EXPECTED_TABLE_TRANSPOSE_PAD = + TABLE_INDENT + "|\u00A0var_a\u00A0\u00A0|\u00A02\u00A0|\n" + + TABLE_INDENT + "|\u00A0var_b\u00A0\u00A0|\u00A02\u00A0|\n" + + TABLE_INDENT + "|\u00A0result\u00A0|\u00A04\u00A0|"; + //@formatter:on + + @Test + public void test_format_data_table_min_size_transpose_pad() { + List> table = Arrays.asList(Arrays.asList("var_a", "var_b", "result"), Arrays.asList("2", "2", "4")); + assertThat(formatDataTable(table, 14), equalTo(MIN_ROW_WIDTH_EXPECTED_TABLE_TRANSPOSE_PAD)); + } }