package fr.p10.miage.rps.tests;

import fr.p10.miage.rps.model.RPSEnum;
import fr.p10.miage.rps.model.Result;
import fr.p10.miage.rps.model.RockPaperScissors;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

import static org.testng.Assert.*;

/**
 * Created by wilpiron on 03/10/2016.
 */
public class RockPaperScissorsTest {

    RockPaperScissors rps;

    @BeforeMethod
    public void setUp() throws Exception {
        rps = new RockPaperScissors();
    }

    @AfterMethod
    public void tearDown() throws Exception {
        rps = null;
    }

    @Test
    public void testPlay() throws Exception {

    }

    @Parameters({"paper","rock"})
    @Test
    public void testWinPlay(String p1, String p2){
        assertEquals(rps.play(RPSEnum.valueOf(p1),RPSEnum.valueOf(p2)), Result.LOST);
    }

}
@@ -318,16 +318,45 @@
 .Test;%0A%0A
+import javax.rmi.CORBA.Tie;%0A%0A
 import s
@@ -851,16 +851,396 @@
 ng p2)%7B%0A
+        assertEquals(rps.play(RPSEnum.valueOf(p1),RPSEnum.valueOf(p2)), Result.WIN);%0A    %7D%0A%0A    @Parameters(%7B%22paper%22,%22paper%22%7D)%0A    @Test%0A    public void testTiePlay(String p1, String p2)%7B%0A        assertEquals(rps.play(RPSEnum.valueOf(p1),RPSEnum.valueOf(p2)), Result.TIE);%0A    %7D%0A%0A    @Parameters(%7B%22paper%22,%22scissors%22%7D)%0A    @Test%0A    public void testLostPlay(String p1, String p2)%7B%0A
         
@@ -1323,10 +1323,9 @@
 ;%0A    %7D%0A
-%0A
 %7D

Adding two test methods to RockPaperScissorsTest : - testTiePlay : asserts a TIE - testLostPlay : asserts a LOST