Skip to content

Commit 2727382

Browse files
authored
Sync tests for practice exercise say (#2611)
1 parent 121baa5 commit 2727382

File tree

2 files changed

+100
-9
lines changed

2 files changed

+100
-9
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
11+
12+
[5d22a120-ba0c-428c-bd25-8682235d83e8]
13+
description = "zero"
14+
15+
[9b5eed77-dbf6-439d-b920-3f7eb58928f6]
16+
description = "one"
17+
18+
[7c499be1-612e-4096-a5e1-43b2f719406d]
19+
description = "fourteen"
20+
21+
[f541dd8e-f070-4329-92b4-b7ce2fcf06b4]
22+
description = "twenty"
23+
24+
[d78601eb-4a84-4bfa-bf0e-665aeb8abe94]
25+
description = "twenty-two"
26+
27+
[f010d4ca-12c9-44e9-803a-27789841adb1]
28+
description = "thirty"
29+
30+
[738ce12d-ee5c-4dfb-ad26-534753a98327]
31+
description = "ninety-nine"
32+
33+
[e417d452-129e-4056-bd5b-6eb1df334dce]
34+
description = "one hundred"
35+
36+
[d6924f30-80ba-4597-acf6-ea3f16269da8]
37+
description = "one hundred twenty-three"
38+
39+
[2f061132-54bc-4fd4-b5df-0a3b778959b9]
40+
description = "two hundred"
41+
42+
[feed6627-5387-4d38-9692-87c0dbc55c33]
43+
description = "nine hundred ninety-nine"
44+
45+
[3d83da89-a372-46d3-b10d-de0c792432b3]
46+
description = "one thousand"
47+
48+
[865af898-1d5b-495f-8ff0-2f06d3c73709]
49+
description = "one thousand two hundred thirty-four"
50+
51+
[b6a3f442-266e-47a3-835d-7f8a35f6cf7f]
52+
description = "one million"
53+
54+
[2cea9303-e77e-4212-b8ff-c39f1978fc70]
55+
description = "one million two thousand three hundred forty-five"
56+
57+
[3e240eeb-f564-4b80-9421-db123f66a38f]
58+
description = "one billion"
59+
60+
[9a43fed1-c875-4710-8286-5065d73b8a9e]
61+
description = "a big number"
62+
63+
[49a6a17b-084e-423e-994d-a87c0ecc05ef]
64+
description = "numbers below zero are out of range"
65+
66+
[4d6492eb-5853-4d16-9d34-b0f61b261fd9]
67+
description = "numbers above 999,999,999,999 are out of range"

exercises/practice/say/src/test/java/SayTest.java

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
public class SayTest {
77

88
private Say say = new Say();
9-
9+
1010
@Test
1111
public void zero() {
1212
assertThat(say.say(0)).isEqualTo("zero");
1313
}
14-
14+
1515
@Ignore("Remove to run test")
1616
@Test
1717
public void one() {
@@ -36,6 +36,18 @@ public void twentyTwo() {
3636
assertThat(say.say(22)).isEqualTo("twenty-two");
3737
}
3838

39+
@Ignore("Remove to run test")
40+
@Test
41+
public void thirty() {
42+
assertThat(say.say(30)).isEqualTo("thirty");
43+
}
44+
45+
@Ignore("Remove to run test")
46+
@Test
47+
public void ninetyNine() {
48+
assertThat(say.say(99)).isEqualTo("ninety-nine");
49+
}
50+
3951
@Ignore("Remove to run test")
4052
@Test
4153
public void oneHundred() {
@@ -48,6 +60,18 @@ public void oneHundredTwentyThree() {
4860
assertThat(say.say(123)).isEqualTo("one hundred twenty-three");
4961
}
5062

63+
@Ignore("Remove to run test")
64+
@Test
65+
public void twoHundred() {
66+
assertThat(say.say(200)).isEqualTo("two hundred");
67+
}
68+
69+
@Ignore("Remove to run test")
70+
@Test
71+
public void nineHundredNinetyNine() {
72+
assertThat(say.say(999)).isEqualTo("nine hundred ninety-nine");
73+
}
74+
5175
@Ignore("Remove to run test")
5276
@Test
5377
public void oneThousand() {
@@ -65,27 +89,27 @@ public void oneThousandTwoHundredThirtyFour() {
6589
public void oneMillion() {
6690
assertThat(say.say(1_000_000)).isEqualTo("one million");
6791
}
68-
92+
6993
@Ignore("Remove to run test")
7094
@Test
7195
public void oneMillionTwoThousandThreeHundredFortyFive() {
7296
assertThat(say.say(1_002_345)).isEqualTo("one million two thousand three hundred forty-five");
7397
}
74-
98+
7599
@Ignore("Remove to run test")
76100
@Test
77101
public void oneBillion() {
78102
assertThat(say.say(1_000_000_000)).isEqualTo("one billion");
79103
}
80-
104+
81105
@Ignore("Remove to run test")
82106
@Test
83107
public void nineHundredEightySevenBillionSixHundredFiftyFourThreeHundredTwentyOneThousandOneHundredTwentyThree() {
84108
assertThat(say.say(987_654_321_123L))
85-
.isEqualTo("nine hundred eighty-seven billion six hundred fifty-four million" +
86-
" three hundred twenty-one thousand one hundred twenty-three");
109+
.isEqualTo("nine hundred eighty-seven billion six hundred fifty-four million" +
110+
" three hundred twenty-one thousand one hundred twenty-three");
87111
}
88-
112+
89113
@Ignore("Remove to run test")
90114
@Test(expected = IllegalArgumentException.class)
91115
public void illegalNegativeNumber() {
@@ -96,5 +120,5 @@ public void illegalNegativeNumber() {
96120
@Test(expected = IllegalArgumentException.class)
97121
public void illegalTooBigNumber() {
98122
say.say(1_000_000_000_000L);
99-
}
123+
}
100124
}

0 commit comments

Comments
 (0)