File tree 4 files changed +31
-0
lines changed
test/java/kyu8/aStrangeTripToTheMarket
4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Kata Found realized
14
14
15
15
- [ A Needle in the Haystack] ( aNeedleInTheHaystack )
16
16
17
+ - [ A Strange Trip to the Market] ( aStrangeTripToTheMarket )
18
+
17
19
- [ Find Nearest square number] ( findNearestSquareNumber )
18
20
19
21
Original file line number Diff line number Diff line change
1
+ package kyu8 .aStrangeTripToTheMarket ;
2
+
3
+ public class Nessie {
4
+ public static boolean isLockNessMonster (String s ) {
5
+ return s .contains ("tree fiddy" ) || s .contains ("3.50" );
6
+ }
7
+ }
Original file line number Diff line number Diff line change
1
+ package kyu8 .aStrangeTripToTheMarket ;
2
+
3
+ import org .junit .jupiter .api .Test ;
4
+
5
+ import static org .junit .jupiter .api .Assertions .assertFalse ;
6
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
7
+
8
+ public class testNessie {
9
+ @ Test
10
+ public void testBasicTrue () {
11
+ String n = "Your girlscout cookies are ready to ship. Your total comes to tree fiddy" ;
12
+ System .out .println (n );
13
+ assertTrue (Nessie .isLockNessMonster (n ));
14
+ }
15
+
16
+ @ Test
17
+ public void testBasicFalse () {
18
+ String n = "Yo, I heard you were on the lookout for Nessie. Let me know if you need assistance." ;
19
+ System .out .println (n );
20
+ assertFalse (Nessie .isLockNessMonster (n ));
21
+ }
22
+ }
You can’t perform that action at this time.
0 commit comments