Skip to content

Commit

Permalink
Unit-Tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jschm42 committed Nov 4, 2023
1 parent 4a5d055 commit 94fb8d3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 50 deletions.
6 changes: 3 additions & 3 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@
<dependency>
<groupId>com.talkforgeai</groupId>
<artifactId>backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.talkforgeai</groupId>
<artifactId>frontend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.talkforgeai</groupId>
<artifactId>service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.0-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
7 changes: 6 additions & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
<dependency>
<groupId>com.talkforgeai</groupId>
<artifactId>service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

public class StringUtils {
public static String maxLengthString(String input, int maxLength) {
if (maxLength < 0) {
if (input == null || maxLength < 0) {
return "";
}
return input.substring(0, Math.min(input.length(), maxLength));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ public void codeBlockWithLangGetsTransformed() {
"\n" +
"<smiley>";

String expected = "Here's an example of how to use the \"Arrays.sort()\" method:\n" +
"\n" +
"<pre><code class=\"language-java\">" +
"int[] numbers = { 5, 3, 9, 1, 7 };\n" +
"Arrays.sort(numbers);\n" +
"</code></pre>\n" +
"\n" +
"<smiley>";
String expected = """
Here's an example of how to use the "Arrays.sort()" method:
<!-- start no-lb -->
<pre>
<code class="language-java">int[] numbers = { 5, 3, 9, 1, 7 };
Arrays.sort(numbers);
</code>
</pre>
<!-- end no-lb -->
<smiley>""";

CodeBlockTransformer transformer = new CodeBlockTransformer();

Expand All @@ -75,14 +80,19 @@ public void codeBlockWithoutLangGetsTransformed() {
"\n" +
"<smiley>";

String expected = "Here's an example of how to use the \"Arrays.sort()\" method:\n" +
"\n" +
"<pre><code >" +
"int[] numbers = { 5, 3, 9, 1, 7 };\n" +
"Arrays.sort(numbers);\n" +
"</code></pre>\n" +
"\n" +
"<smiley>";
String expected = """
Here's an example of how to use the "Arrays.sort()" method:
<!-- start no-lb -->
<pre>
<code >int[] numbers = { 5, 3, 9, 1, 7 };
Arrays.sort(numbers);
</code>
</pre>
<!-- end no-lb -->
<smiley>""";

CodeBlockTransformer transformer = new CodeBlockTransformer();

Expand Down

0 comments on commit 94fb8d3

Please sign in to comment.