Newer
Older
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
45
package smash.appointment.parse;
import static org.junit.Assert.*;
import java.io.IOException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
public class DuplicateRemoveParserTest {
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
@Test
public void test() throws IOException {
DuplicateRemoveParser parser = new DuplicateRemoveParser();
SubjectDao subjectDao = new SubjectDao();
subjectDao.addSubject(new Subject("First", "Last", "","P-113"), null);
subjectDao.addSubject(new Subject("First", "Last", "","P-114"), null);
subjectDao.addSubject(new Subject("A", "B", "","P-115"), null);
subjectDao.addSubject(new Subject("C", "D", "","P-116"), null);
assertEquals(4, subjectDao.getSubjects().size());
parser.setSubjectDao(subjectDao);
parser.removeDuplicates("testFiles/duplicates.txt");
assertEquals(2, subjectDao.getSubjects().size());
}
}