-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrammarCheckerTest.java
36 lines (30 loc) · 986 Bytes
/
GrammarCheckerTest.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
package proj5;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
public class GrammarCheckerTest {
private GrammarChecker Gc;
@Before
public void setUp() throws Exception {
Gc = new GrammarChecker("src/proj5/bigThesaurus.txt", 1);
}
@Test
public void testWordCounter_std(){
Gc.improveGrammar("src/proj5/lamb.txt");
// System.out.println(wC);
String w = "Wo,d";
Character c = w.charAt(0);
assertEquals(true, c.isLetter(c));
assertEquals(true, c.isUpperCase(c));
c = w.charAt(1);
assertEquals(true, c.isLetter(c));
assertEquals(false, c.isUpperCase(c));
c = w.charAt(2);
assertEquals(false, c.isLetter(c));
assertEquals(false, c.isUpperCase(c));
Gc.improveGrammar("src/proj5/apartment.txt");
}
}