/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package model;
import model.TokenStack.moveType;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author Ten
*/
public class TokenStackTest {
public TokenStackTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
// @Test
public void testGetOwner() {
System.out.println("getOwner");
TokenStack instance = null;
Player expResult = null;
Player result = instance.getOwner();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
// @Test
public void testSetAddress() {
System.out.println("setAddress");
int address = 0;
TokenStack instance = null;
instance.setAddress(address);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
// @Test
public void testSetOwner() {
System.out.println("setOwner");
Player owner = null;
TokenStack instance = null;
instance.setOwner(owner);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
// @Test
public void testGetTokens() {
System.out.println("getTokens");
TokenStack instance = null;
Token[] expResult = null;
Token[] result = instance.getTokens();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
// @Test
public void testStackToken() {
System.out.println("stackToken");
Token[] pTokens = null;
TokenStack instance = null;
instance.stackToken(pTokens);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
@Test
public void testStackTokenStarting() {
System.out.println("stackTokenStarting");
Player b=new Player(1,"B");
Player a= new Player(0,"A");
//create special starting stack containing default 9 tokens
TokenStack target = new TokenStack(a,true);
target.setAddress(-1);
//remove two
TokenStack toMove=target.getMovingStack();
//remove one more
TokenStack toMove2=target.getMovingStack();
//add back one token
target.stackTokenStarting(toMove2.getTokens());
//result of previous operations is 9-2-1+1=7
int result=7;
int expResult=target.getTokenCount();
assertEquals(expResult, result);
}
// @Test
public void testChangeAddress() {
System.out.println("changeAddress");
int newAdd = 0;
TokenStack instance = null;
instance.changeAddress(newAdd);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
// @Test
public void testGetAddress() {
System.out.println("getAddress");
TokenStack instance = null;
int expResult = 0;
int result = instance.getAddress();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
@Test
public void testAddMove() {
System.out.println("addMove");
Player b=new Player(1,"B");
Player a= new Player(0,"A");
TokenStack target = new TokenStack(a);
target.setAddress(4);
int diceResult = 2;
TokenStack toMove = new TokenStack(b);
toMove.setAddress(2);
boolean result = toMove.addMove(target, diceResult);
boolean expResult = true;
assertEquals(expResult, result);
}
//@Test
public void testGetStrength() {
System.out.println("getStrength");
TokenStack instance = null;
int expResult = 0;
int result = instance.getStrength();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
// @Test
public void testGetTokenCount() {
System.out.println("getTokenCount");
TokenStack instance = null;
int expResult = 0;
int result = instance.getTokenCount();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
//@Test
public void testWasMoveValid() {
System.out.println("wasMoveValid");
TokenStack instance = null;
boolean expResult = false;
boolean result = instance.wasMoveValid();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
//@Test
public void testGetMoveType() {
System.out.println("getMoveType");
TokenStack instance = null;
moveType expResult = null;
moveType result = instance.getMoveType();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
@Test
public void testGetMovingStack() {
System.out.println("getMovingStack");
TokenStack instance = new TokenStack(new Player(-1,"A"),true);
int expResult = 1;
TokenStack result = instance.getMovingStack();
result=instance.getMovingStack();
int tresult=result.getTokenCount();
assertEquals(expResult, tresult);
}
//@Test
public void testToString() {
System.out.println("toString");
TokenStack instance = null;
String expResult = "";
String result = instance.toString();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
}