Unit testing (as per Function Testing in 5.2.2) of section 3.1.1 of the SRS v3

3.1.1 - Create New Virtual Player

3.1.1.1

- 1. Use username and password administrated by Queensland Office of Gaming Regulations (QOGR) which uniquely assigned to each client program. End user uses Andrew for test case senarios.

3.1.1.2

- 2. Ensure that a playerID is unique by logging in using "Andrew" as username and starting another session with the same name. As a result, the dialog should display appropriate error message.
- 3. Ensure that password can not be either under 5 characters or above 10 characters.
- 4. Ensure that the player's user name exists in the database. If so, player is automatically assigned to a table.
- 5. Ensure that the player's name appears in the name box above the position that they will be controlling the cards for.
- 6. Ensure that a starting amount has been allocated to that player.
- 7. Ensure that the chat option is able to be used by the unit tester.
- 8. Note the balance before logging out of the game.
- 9. Logout out of the game.
- 10. Repeat step 3 through 8 to ensure changes in database are reflected accordingly as per step 8.

3.1.2 - User logs into virtual casino and gets assigned to a table

3.1.2.1

- 1. Ensure that only valid playerID's and password are able to join into an existing game.
- 2. The unit tester is now to re-log into the virtual casino using the player created above -- Andrew Noske
- 3. Ensure that the starting balance of the player matches the ending balance of the player in the above instance.

3.1.2.2

- 4. Press the "View rules" button to ensure code dialog box appears containing rules and in the correct position after entering valid username and password
- 5. Press the "Join a Table" button to ensure the player is automatically assigned to a table and in the correct position.
- 6. Log-out of the blackjack game

3.1.3 - User plays blackjack at a table

- 1. Press bet buttons to ensure that a player is unable to affect a game state until the next round of blackjack commences.
- 2. Ensure that the table has only 4 boxes visible for players, plus one box for the dealer.

3.1.3.1

- 3. Test bet amount by placing no bet before timeout period of 15 seconds expires. A minimum bet shou,d be placed for the player ($5).
- 4. Test bet amount by trying to place a bet under the minimum. Amount should default to minimum bet.
- 5. Test bet amount by trying to place a bet over maximum. If the bet is over the maximum, the bet should default to over the maximum.

3.1.3.2

- 6. Ensure the players playing the game are each dealt two initial cards.
- 7. Ensure that the dealer is dealt one card face up and one face down.

3.1.3.3

- 10. Ensure that player playing box assigned is the only one the player can affect.
- 11. Ensure that step 10 is repeated for each player.
- 12. Ensure that a player is unable to adjust their bet after the hand has begun.
- 13. Ensure that the appropriate buttons are available to Andrew when it is his turn to play.
- 14. Ensure that a player is able to decide whether they are able to hit or stay when it is their turn to decide.
- 15. Ensure that the default action works if a player decides not to make a decision.
- 16. Ensure that the player is unable to hit for any more cards after they have busted.
- 17. Ensure that the player is able to stay on any card total.
- 18. Ensure that once each player has decided on whether or not to hit or stay that the dealer is given a turn to take its turn.
- 19. Ensure steps 7 through 18 cause cards to be reduced in the shoe as reflected by gameplay.

3.1.3.4 and 3.1.3.5

- 20. Ensure that when the Dealer card total is 16 or below that the dealer continues to hit.
- 21. Ensure that when the Dealers card total is it above 16 and below 22 the dealer stays.
- 22. Ensure that when the Dealers card total is above 21 that the dealer busts.
- 23. Ensure that the outcome is the proper outcome for the following instances:
  - 23.1. Ensure that when the players card total is less than the dealer that the players bet is deducted from their bank balance.
  - 23.2. Ensure that when the players card total is the same as the dealer that the players bank balance is the same as the start of the round.
  - 23.3. Ensure that when the players card total is greater then the dealer that the players bank balance is increased by the proper amount.
  - 23.4.Ensure that when the dealer busts that the players bank balance is increased by the proper amount if and only if the player has a valid hand.
  - 23.5. Ensure that when the player busts that the amount wagered is deducted from their bank balance.
  - 23.6. Ensure that when a players balance is decreased to less than the tables minimum that the player is told that they are "bankrupt" via a message box and exit the casino.

3.1.3.6

- 24. Ensure that the cards are removed from the table at the end each round under the circumstances described in steps 20 thru 23.6.

3.1.3.7

- 25. Ensure that a player is able to leave a table by pressing the "Leave table" button.
- 26. Join a table and leave a table before the player is to participate in the next hand.
- 27. Join a table and leave a table before the player is able to action a hand after the initial two cards are dealt, and ensure that their bank balance is reduced by the amount wagered.
- 28. Join the table and leave a table while a player is prompted to act on their hand, and ensure that their bank balance is reduced by the amount wagered.
- 29. Join the table and leave a table while a player is prompted to act on their hand and have hit for a card, and ensure that their bank balance is reduced by the amount wagered.
- 30. Join the table and leave a table while a player is prompted to act on their hand and have hit for a card and bust, and ensure that their bank balance is reduced by the amount wagered.
- 31. Join the table and leave a table while a player is prompted to act on their hand and have decided to stay, and ensure that their bank balance is reduced by the amount wagered.
- 32. Join the table and leave the game after the player has decided to stay and it is the next players turn, and ensure that their bank balance is reduced by the amount wagered.
- 33. Join the table and leave the game after the player has decided to stay and while it is the dealers turn, and ensure that their bank balance is reduced by the amount wagered.
- 34. Join the table and leave the game after the player has decided to stay and after the dealers has reached a result, and ensure that their bank balance left the same at the time that they chose to leave.

Testing for 3.1.1 - Create New Virtual Player was completed and was successful
Testing for 3.1.2 - User logs into virtual casino and gets assigned to a table was completed and was successful
Testing for 3.1.3 - User plays blackjack at a table was completed and was successful