Testcases - \/Name Marius Acsinte\/Assignment 5\/Class CSE 360\/Session Mo-We 4:30 pm 5:45 pm\/importing the necessary packages package app import

Testcases - /Name Marius Acsinte/Assignment 5/Class CSE...

This preview shows page 1 - 2 out of 3 pages.

//****************************************************************************** **// //Name : Marius Acsinte //Assignment : 5 //Class : CSE 360 //Session : Mo-We 4:30 pm - 5:45 pm //****************************************************************************** **// //importing the necessary packages. package app; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; //Class Testcases which will hold our test cases. public class Testcases { //Defining global variables used below. private GameBoard board; private Player p1; private Player p2; // Global variables are initialized here so that the can be used across our test cases. @Before public void setUp(){ //A Game Board is created. //Player 1 is created and it has assigned the player a Black piece. //Player 2 is created and it has assigned the player a Yellow piece. board = new GameBoard(); board.createBoard(); p1 = new Player(1, "black"); p2 = new Player(2, "yellow"); } //Player 1 and Player 2 place a Black piece and a Yellow piece in sequence at the positions 3 and 7 (intersections) which are unoccupied. @Test public void testCase1() { board.placePiece(3,p1); board.placePiece(7,p2); boolean player1 = board.isPiecePlaced(3,p1); boolean player2 = board.isPiecePlaced(7,p2);
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 3 pages?

  • Spring '08
  • Balasooriya
  • The Place, piece, Chess piece, public void

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes