public class StandaloneModelClassesTests
extends java.lang.Object
Constructor and Description |
---|
StandaloneModelClassesTests() |
Modifier and Type | Method and Description |
---|---|
void |
AddCardsToTheHand()
Tests adding cards to the hand
Note : test is similar for the Talon
No exception should be fired
|
void |
CardComparisonTest()
Test if cards are correctly compared
following their Suit and Rank
|
void |
CardGroupNumberException()
Tests creating the hand and the Talon
Two exceptions should be fired
|
void |
CardInstantiationTest()
Test if instantiation increments Card instances number
No exception should be fired
|
void |
CardNumberExceptionTest()
Tests CardGroupNumberException that should be fired
|
void |
CardUniquenessExceptionTest()
Tests CardUniquenessException that should be fired
|
void |
cleanClasses()
Reset static fields before each test
|
void |
handAndChienInstantiation()
Tests creating the hand and the Talon
Two exceptions should be fired
|
void |
MultipleCardInstantiationExceptionTest()
Tests CardNumberException that should be fired
|
void |
MultipleCardInstantiationTest()
Tests if Card class is not too much instantiated :
only a limited number of cards is allowed
No exception should be fired
|
public void cleanClasses()
public void CardInstantiationTest() throws CardNumberException, CardUniquenessException
CardNumberException
- if user tries to create too much cardsCardUniquenessException
- if user tries to create too identical cardspublic void MultipleCardInstantiationTest() throws CardNumberException
CardNumberException
- if user tries to create too much cardspublic void AddCardsToTheHand() throws CardNumberException, CardGroupNumberException
CardNumberException
- if user tries to create too much cardsCardGroupNumberException
- if user tries to create too much handspublic void handAndChienInstantiation() throws CardGroupNumberException
CardGroupNumberException
- if user tries to create too much handspublic void CardComparisonTest()
public void MultipleCardInstantiationExceptionTest() throws CardNumberException
CardNumberException
- if user tries to create too much cardspublic void CardUniquenessExceptionTest() throws CardNumberException, CardUniquenessException
CardNumberException
- if user tries to create too much cardsCardUniquenessException
- if user tries to create too identical cardspublic void CardNumberExceptionTest() throws CardNumberException, CardGroupNumberException
CardNumberException
- if user tries to create too much cardsCardGroupNumberException
- if user tries to create too much handspublic void CardGroupNumberException() throws CardGroupNumberException
CardGroupNumberException
- if user tries to create too much hands