package Parser;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class PairFileParserTest {

    @Before
    public void setUp() throws Exception {

    }

    @After
    public void tearDown() throws Exception {

    }

    @Test
    public void testReadPair() throws Exception {

    }

    @Test
    public void testRead() throws Exception {

    }

    @Test
    public void testReadLine() throws Exception {

    }

    @Test
    public void testEndOfBlock() throws Exception {

    }

    @Test
    public void testIsEndOfBlock() throws Exception {

    }
}
@@ -83,16 +83,85 @@
 .Test;%0A%0A
+import Pair.Pair;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0A
 import s
@@ -218,24 +218,60 @@
 rserTest %7B%0A%0A
+    PairFileParser pairFileParser;%0A%0A
     @Before%0A
@@ -317,415 +317,1683 @@
 n %7B%0A
-%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testReadPair() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testRead() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testReadLine() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testEndOfBlock() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testIsEndOfBlock() throws Exception %7B%0A
+        String DESKTOP_PATH = System.getProperty(%22user.home%22);%0A        String FILE_NAME = DESKTOP_PATH + %22%5C%5Cdesktop%5C%5Csimple.txt%22;%0A%0A        File file = new File(FILE_NAME);%0A        pairFileParser = new PairFileParser(file);%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testReadPair() throws Exception %7B%0A        try %7B%0A            Pair pair = pairFileParser.readPair('=');%0A            assertEquals(pair.getKey(), %22NAME%22);%0A            assertEquals(pair.getValue().toString(), %22%5BJOHN DOE%5D%22);%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testRead() throws Exception %7B%0A        try %7B%0A            char c = (char) pairFileParser.read();%0A            assertEquals(c, 'N');%0A        %7D catch (IOException e)%7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testReadLine() throws Exception %7B%0A        try %7B%0A            String line = pairFileParser.readLine();%0A            assertEquals(line, %22NAME = JOHN DOE%22);%0A        %7D catch (IOException e)%7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testEndOfBlock() throws Exception %7B%0A        pairFileParser.endOfBlock('-', '-');%0A        assertFalse(pairFileParser.isEndOfBlock());%0A    %7D%0A%0A    @Test%0A    public void testIsEndOfBlock() throws Exception %7B%0A        testEndOfBlock();%0A        try %7B%0A            while (pairFileParser.readPair('=') != null)%7B%0A                if (pairFileParser.isEndOfBlock())%7B%0A                    assertTrue(true);%0A                   break;%0A                %7D%0A            %7D%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D
 %0A   

Create and Pass PairFileParser class Test [Finishes #111765090]