|
|
@@ -21,7 +21,7 @@ public class PhoneNumberFactoryTest {
|
|
21
|
21
|
}
|
|
22
|
22
|
|
|
23
|
23
|
@Test
|
|
24
|
|
- public void testCreatePhoneNumberSafely() {
|
|
|
24
|
+ public void testCreatePhoneNumberSafely() throws InvalidPhoneNumberFormatException{
|
|
25
|
25
|
// : Given
|
|
26
|
26
|
int areaCode = 0;
|
|
27
|
27
|
int centralOfficeCode = 0;
|
|
|
@@ -35,7 +35,7 @@ public class PhoneNumberFactoryTest {
|
|
35
|
35
|
}
|
|
36
|
36
|
|
|
37
|
37
|
@Test
|
|
38
|
|
- public void testGetAreaCode() {
|
|
|
38
|
+ public void testGetAreaCode() throws InvalidPhoneNumberFormatException{
|
|
39
|
39
|
// : Given
|
|
40
|
40
|
Integer areaCode = 302;
|
|
41
|
41
|
int centralOfficeCode = 312;
|
|
|
@@ -49,7 +49,7 @@ public class PhoneNumberFactoryTest {
|
|
49
|
49
|
}
|
|
50
|
50
|
|
|
51
|
51
|
@Test
|
|
52
|
|
- public void testGetCentralOfficeCode() {
|
|
|
52
|
+ public void testGetCentralOfficeCode() throws InvalidPhoneNumberFormatException{
|
|
53
|
53
|
// : Given
|
|
54
|
54
|
int areaCode = 302;
|
|
55
|
55
|
Integer centralOfficeCode = 312;
|
|
|
@@ -64,7 +64,7 @@ public class PhoneNumberFactoryTest {
|
|
64
|
64
|
|
|
65
|
65
|
|
|
66
|
66
|
@Test
|
|
67
|
|
- public void testPhoneLineCode() {
|
|
|
67
|
+ public void testPhoneLineCode() throws InvalidPhoneNumberFormatException{
|
|
68
|
68
|
// : Given
|
|
69
|
69
|
int areaCode = 302;
|
|
70
|
70
|
int centralOfficeCode = 312;
|
|
|
@@ -78,7 +78,7 @@ public class PhoneNumberFactoryTest {
|
|
78
|
78
|
}
|
|
79
|
79
|
|
|
80
|
80
|
@Test
|
|
81
|
|
- public void testCreateRandomPhoneNumber() {
|
|
|
81
|
+ public void testCreateRandomPhoneNumber() throws InvalidPhoneNumberFormatException{
|
|
82
|
82
|
for (int i = 0; i < 999; i++) {
|
|
83
|
83
|
// : Given
|
|
84
|
84
|
// : When
|