| Akron | 8abefa1 | 2016-02-13 05:35:42 +0100 | [diff] [blame] | 1 | package de.ids_mannheim.korap.response; |
| 2 | |
| 3 | import de.ids_mannheim.korap.response.Match; |
| 4 | |
| 5 | import static org.junit.Assert.*; |
| 6 | import org.junit.Test; |
| 7 | import org.junit.Ignore; |
| 8 | import org.junit.runner.RunWith; |
| 9 | import org.junit.runners.JUnit4; |
| 10 | |
| 11 | @RunWith(JUnit4.class) |
| 12 | public class TestMatch { |
| 13 | |
| 14 | @Test |
| 15 | public void testNoMatch () { |
| 16 | Match m = new Match("aaa", false); |
| 17 | assertEquals(null, m.getID()); |
| 18 | }; |
| 19 | |
| 20 | @Test |
| 21 | public void testMatchBug () { |
| 22 | Match m = new Match("match-PRO-DUD!PRO-DUD_KSTA-2013-01.7483-2013-01", false); |
| 23 | assertEquals(null, m.getID()); |
| 24 | }; |
| 25 | |
| 26 | @Test |
| 27 | public void testMatchTextSigle1 () { |
| 28 | Match m = new Match("match-GOE!GOE_AGK.00000-p60348-60349", false); |
| 29 | assertEquals("GOE_AGK.00000", m.getTextSigle()); |
| 30 | }; |
| 31 | |
| 32 | @Test |
| 33 | public void testMatchTextSigle2 () { |
| 34 | Match m = new Match("match-PRO-DUD!PRO-DUD_KSTA-2013-01.3651-p326-327", false); |
| 35 | assertEquals("PRO-DUD_KSTA-2013-01.3651", m.getTextSigle()); |
| 36 | }; |
| 37 | }; |