package com.grayben.riskExtractor.htmlScorer;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;

import java.util.Map;

import static org.junit.Assert.*;

/**
 * Created by beng on 28/11/2015.
 */
public class ScoredTextElementTest {

    ScoredTextElement scoredTextElement;
    Map<String, Integer> mockedScores;

    @Before
    public void setUp() throws Exception {
        mockedScores = Mockito.mock(Map.class);
        scoredTextElement = new ScoredTextElement("Section 1A: Risk", mockedScores);
    }

    @After
    public void tearDown() throws Exception {

    }

    @Test
    public void testGetTextElement_ReturnsScores_Always() throws Exception {
        //setup data


        //setup expectation


        //execute
        Map scores;
        scores = scoredTextElement.getScores();

        //verify
        assertEquals(mockedScores, scores);

    }

    @Ignore
    @Test
    public void testGetScores() throws Exception {

    }
}
@@ -160,19 +160,16 @@
 ito.Mock
-ito
 ;%0A%0Aimpor
@@ -341,16 +341,27 @@
 Element;
+%0A%0A    @Mock
 %0A    Map
@@ -378,28 +378,65 @@
 nteger%3E 
-mockedScores
+scoresMock;%0A%0A    @Mock%0A    String textElementMock
 ;%0A%0A    @
@@ -497,130 +497,334 @@
     
-mockedScores = Mockito.mock(Map.class);
+scoredTextElement = new ScoredTextElement(textElementMock, scoresMock);%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A
 %0A    
+%7D%0A%0A
     
-scoredTextElement = new ScoredTextElement(%22Section 1A: Risk%22, mockedScores
+@Test%0A    private void test_GetTextElement_IsNotNull_Always()%7B%0A        String textElementReturned = scoredTextElement.getTextElement();%0A%0A        assertNotNull(textElementReturned
 );%0A 
@@ -838,32 +838,32 @@
    @
-After
+Test
 %0A    p
-ublic
+rivate
  void te
 arDo
@@ -862,36 +862,157 @@
 d te
-arDown() throws Exception %7B%0A
+st_GetScores_IsNotNull_Always()%7B%0A        Map%3CString, Integer%3E scoresReturned = scoredTextElement.getScores();%0A%0A        assertNotNull(scoresReturned);
 %0A   
@@ -1067,16 +1067,22 @@
 _Returns
+Mocked
 Scores_A
@@ -1120,105 +1120,280 @@
     
-//setup data%0A%0A%0A        //setup expectation%0A%0A%0A        //execute%0A        Map scores;%0A        scores
+Map scoresReturned = scoredTextElement.getScores();%0A%0A        assertEquals(scoresMock, scoresReturned);%0A%0A    %7D%0A%0A    @Test%0A    public void testGetTextElement_ReturnsMockedTextElement_Always() throws Exception %7B%0A        String textElementReturned;%0A        textElementReturned
  = s
@@ -1404,38 +1404,43 @@
 dTextElement.get
-Scores
+TextElement
 ();%0A%0A        //v
@@ -1440,58 +1440,57 @@
     
-//verify%0A        assertEquals(mockedScores, scores
+assertEquals(textElementMock, textElementReturned
 );%0A%0A

Write tests