package com.grayben.riskExtractor.htmlScorer.scorers;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;

/**
 * Created by beng on 28/11/2015.
 */
@RunWith(MockitoJUnitRunner.class)
public class ScorerTest<T> {

    private Scorer<T> scorerSUT;

    protected void setScorerSUT(Scorer<T> scorerSUT){
        this.scorerSUT = scorerSUT;
    }

    @Mock
    public T argumentToBeScoredMock;

    @Rule
    public ExpectedException thrown = ExpectedException.none();

    @Before
    public void setUp() throws Exception {
    }

    @After
    public void tearDown() throws Exception {
        scorerSUT = null;
    }

    @Test
    public void test_ScoreReturnsInteger_WhenArgumentIsNonNull
            () throws Exception {
        scorerSUT.score(argumentToBeScoredMock);
    }

    @Test
    public void test_ScoreThrowsNullPointerException_WhenArgumentIsNull
            () throws Exception {
        thrown.expect(NullPointerException.class);

        scorerSUT.score(null);
    }

    @Test
    public void test_GetScoreLabelReturnsNonNull
            () throws Exception {
        assertNotNull(scorerSUT.getScoreLabel());
    }

    @Test
    public void test_GetScoreLabelReturnsNonEmptyString
            () throws Exception {
        assertNotEquals("", scorerSUT.getScoreLabel());
    }
}
@@ -470,16 +470,25 @@
 %0Apublic 
+abstract 
 class Sc

Make ScorerTest abstract: must not be run without being subtyped