forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_273Test.java
38 lines (31 loc) · 853 Bytes
/
_273Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.fishercoder;
import com.fishercoder.solutions._273;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Created by fishercoder on 5/13/17.
*/
public class _273Test {
private static _273 test;
private static int num;
@BeforeClass
public static void setup(){
test = new _273();
}
@Test
public void test1(){
num = 123;
assertEquals("One Hundred Twenty Three", test.numberToWords(num));
}
@Test
public void test2(){
num = 12345;
assertEquals("Twelve Thousand Three Hundred Forty Five", test.numberToWords(num));
}
@Test
public void test3(){
num = 1234567;
assertEquals("One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven", test.numberToWords(num));
}
}