File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
kata/8-kyu/up-and-down-the-string-grows Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
- class StrangeString {
2
- static final String STRANGE_STRING = "ß" ;
3
-
4
- private StrangeString () {}
1
+ interface StrangeString {
2
+ String STRANGE_STRING = "ß" ;
5
3
}
Original file line number Diff line number Diff line change 1
1
import static org .junit .jupiter .api .Assertions .assertEquals ;
2
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
2
3
4
+ import java .nio .file .Files ;
5
+ import java .nio .file .Path ;
6
+ import java .nio .file .Paths ;
3
7
import org .junit .jupiter .api .Test ;
4
8
5
9
class SolutionTest {
@@ -8,4 +12,11 @@ void sample() {
8
12
String upDown = StrangeString .STRANGE_STRING .toUpperCase ().toLowerCase ();
9
13
assertEquals (StrangeString .STRANGE_STRING .length () + 1 , upDown .length ());
10
14
}
15
+
16
+ @ Test
17
+ void solutionSize () throws Exception {
18
+ Path current = Paths .get ("" ).toAbsolutePath ();
19
+ Path solution = current .resolve ("main/StrangeString.java" );
20
+ assertTrue (Files .size (solution ) < 81 , "Solution should be 80 characters max." );
21
+ }
11
22
}
You can’t perform that action at this time.
0 commit comments