Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
class StrangeString {
static final String STRANGE_STRING = "ß";

private StrangeString() {}
interface StrangeString {
String STRANGE_STRING = "ß";
}
11 changes: 11 additions & 0 deletions kata/8-kyu/up-and-down-the-string-grows/test/SolutionTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.junit.jupiter.api.Test;

class SolutionTest {
Expand All @@ -8,4 +12,11 @@ void sample() {
String upDown = StrangeString.STRANGE_STRING.toUpperCase().toLowerCase();
assertEquals(StrangeString.STRANGE_STRING.length() + 1, upDown.length());
}

@Test
void solutionSize() throws Exception {
Path current = Paths.get("").toAbsolutePath();
Path solution = current.resolve("main/StrangeString.java");
assertTrue(Files.size(solution) < 81, "Solution should be 80 characters max.");
}
}