package com.grayben.riskExtractor.headingMarker;

import com.grayben.riskExtractor.headingMarker.elector.ElectedTextList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import java.util.List;

import static org.junit.Assert.*;

/**
 * Created by beng on 28/11/2015.
 */
@RunWith(MockitoJUnitRunner.class)
public class MarkedTextTest {

    @Mock
    ElectedTextList electedTextListMock;

    MarkedText markedTextSUT;

    @Before
    public void setUp() throws Exception {
        markedTextSUT = new MarkedText(electedTextListMock);
    }

    @After
    public void tearDown() throws Exception {

    }

    @Test
    public void test_Init_ThrowsInvalidArgumentException_WhenTextArgumentIsNull(){

    }

    @Test
    public void test_SubSelections_ReturnNonNull_Always() throws Exception {
        List<String> subSelectionsReturned = markedTextSUT.subSelections();
        assertNotNull(subSelectionsReturned);
    }
}
@@ -181,20 +181,85 @@
 g.junit.
-Test
+Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException
 ;%0Aimport
@@ -577,16 +577,102 @@
 tMock;%0A%0A
+    @Rule%0A    public ExpectedException expectedException = ExpectedException.none();%0A%0A
     Mark
@@ -929,14 +929,14 @@
 owsI
-nvalid
+llegal
 Argu
@@ -975,16 +975,202 @@
 Null()%7B%0A
+        expectedException.expect(IllegalArgumentException.class);%0A        ElectedTextList electedTextListArgument = null;%0A        markedTextSUT = new MarkedText(electedTextListArgument);
 %0A    %7D%0A%0A

Add IllegalArgumentException test