/*
 * Copyright (c) 2015 Justin White <jw@justinwhite.net>
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  1. Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *
 *  2. Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 *  3. Neither the name of the copyright holder nor the names of its
 *  contributors may be used to endorse or promote products derived from this
 *  software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 *  POSSIBILITY OF SUCH DAMAGE.
 */

package net.justinwhite.score_model;

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

import static org.junit.Assert.assertEquals;

public class Phase10PlayerTest {
    private final String testName = "Test Phase10Player";
    private final String testInitials = "TP";
    private final int testScore = 11;
    private final int testPhase = 1;
    private Phase10Player testPhase10Player;

    @Before
    public void setUp() {
        testPhase10Player = new Phase10Player(testName);
        testPhase10Player.addScore(testScore);
        testPhase10Player.nextPhase();
    }

    @Test
    public void testToString() throws Exception {
        assertEquals(String.format(
                             "Name '%s'; Score %s; Phase %d",
                             testName,
                             testScore,
                             testPhase
                     ), testPhase10Player.toString()
        );
    }

    @Test
    public void testGetName() throws Exception {
        assertEquals(testName, testPhase10Player.getName());
    }

    @Test
    public void testSetName() throws Exception {
        String newName = "Phase10Player Test";
        testPhase10Player.setName(newName);
        assertEquals(newName, testPhase10Player.getName());
        testPhase10Player.setName(testName);
    }

    @Test
    public void testGetInitials() throws Exception {
        assertEquals(testInitials, testPhase10Player.getInitials());
    }

    @Test
    public void testGetScore() throws Exception {
        assertEquals(testScore, testPhase10Player.getScore());
    }

    @Test
    public void testAddScore() throws Exception {
        testPhase10Player.addScore(testScore);
        assertEquals(testScore * 2, testPhase10Player.getScore());
    }

    @Test
    public void testGetPhase() throws Exception {
        assertEquals(testPhase, testPhase10Player.getPhase());
    }

    @Test
    public void testNextPhase() throws Exception {
        testPhase10Player.nextPhase();
        assertEquals(testPhase + 1, testPhase10Player.getPhase());
    }
}

@@ -2537,666 +2537,8 @@
  %7D%0A%0A
-    @Test%0A    public void testGetName() throws Exception %7B%0A        assertEquals(testName, testPhase10Player.getName());%0A    %7D%0A%0A    @Test%0A    public void testSetName() throws Exception %7B%0A        String newName = %22Phase10Player Test%22;%0A        testPhase10Player.setName(newName);%0A        assertEquals(newName, testPhase10Player.getName());%0A        testPhase10Player.setName(testName);%0A    %7D%0A%0A    @Test%0A    public void testGetInitials() throws Exception %7B%0A        assertEquals(testInitials, testPhase10Player.getInitials());%0A    %7D%0A%0A    @Test%0A    public void testGetScore() throws Exception %7B%0A        assertEquals(testScore, testPhase10Player.getScore());%0A    %7D%0A%0A
     
@@ -2718,138 +2718,8 @@
  %7D%0A%0A
-    @Test%0A    public void testGetPhase() throws Exception %7B%0A        assertEquals(testPhase, testPhase10Player.getPhase());%0A    %7D%0A%0A
     

Remove getter & setter and inherited method tests.