forked from DavidMatuszek/SentenceGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListOfDefinitionsTest.java
More file actions
44 lines (38 loc) · 1.17 KB
/
ListOfDefinitionsTest.java
File metadata and controls
44 lines (38 loc) · 1.17 KB
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
39
40
41
42
43
44
package sentenceGenerator;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
/**
* @author <Rajveer Parikh>
*/
public class ListOfDefinitionsTest {
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
}
/**
* Test method for {@link sentenceGenerator.ListOfDefinitions#toString()}.
*/
@Test
public final void testToString() {
ListOfDefinitions testListOfDef = new ListOfDefinitions();
ListOfDefinitions testListOfDef2 = new ListOfDefinitions();
SingleDefinition def1 = new SingleDefinition();
SingleDefinition def2 = new SingleDefinition();
SingleDefinition def3 = new SingleDefinition();
SingleDefinition def4 = new SingleDefinition();
def1.add("<adjective>");
def2.add("<adjective>");
def2.add("<adjectives>");
def3.add("boy");
def4.add("ring");
testListOfDef.add(def1);
testListOfDef.add(def2);
testListOfDef2.add(def3);
testListOfDef2.add(def4);
assertEquals("<adjective> | <adjective> <adjectives>", testListOfDef.toString());
assertEquals("boy | ring", testListOfDef2.toString());
}
}