testing.users.user
Class UserTestSuite

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by testing.users.user.UserTestSuite
All Implemented Interfaces:
junit.framework.Test

public class UserTestSuite
extends junit.framework.TestCase

Test suite for the VOOGA Users component

Author:
Alex Edelsburg

Constructor Summary
UserTestSuite()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void setUp()
          Prepares the necessary environment for each test
 void tearDown()
          Destroys environment after each test
 void testBadNameChange()
          Tests that name changes for non-existent users fail
 void testChangeName()
          Tests the name-changing abilities of the VOOGA user component
 void testChangePassword()
          Checks that passwords can be changed
 void testComplexSerialization()
          Tests the serialization of a user with games, friends, and other data
 void testDupeAddFailure()
          Checks that user with same name as someone in DB cannot be added
 void testLogin()
          Checks the login functionality of the database
 void testMatching()
          Tests the matching code that finds a an opponent of a similar skill level for a given game
 void testPassword()
          Checks that passwords are stored properly when a user is created
 void testSimpleAdd()
          Adds a user to the database & pulls out the info.
 void testSimpleSerialization()
          Tests the serialization of a user with only a user name and a password
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserTestSuite

public UserTestSuite()
Method Detail

setUp

public void setUp()
Prepares the necessary environment for each test

Overrides:
setUp in class junit.framework.TestCase

tearDown

public void tearDown()
Destroys environment after each test

Overrides:
tearDown in class junit.framework.TestCase

testSimpleAdd

public void testSimpleAdd()
                   throws java.io.IOException,
                          java.lang.ClassNotFoundException
Adds a user to the database & pulls out the info. Tests that non-existent users do not return data

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testChangeName

public void testChangeName()
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException
Tests the name-changing abilities of the VOOGA user component

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testBadNameChange

public void testBadNameChange()
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
Tests that name changes for non-existent users fail

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testPassword

public void testPassword()
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Checks that passwords are stored properly when a user is created

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testChangePassword

public void testChangePassword()
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException
Checks that passwords can be changed

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testLogin

public void testLogin()
               throws java.io.IOException,
                      java.lang.ClassNotFoundException
Checks the login functionality of the database

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testDupeAddFailure

public void testDupeAddFailure()
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException
Checks that user with same name as someone in DB cannot be added

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testMatching

public void testMatching()
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Tests the matching code that finds a an opponent of a similar skill level for a given game

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testSimpleSerialization

public void testSimpleSerialization()
                             throws java.io.IOException,
                                    java.lang.ClassNotFoundException
Tests the serialization of a user with only a user name and a password

Throws:
java.lang.ClassNotFoundException
java.io.IOException

testComplexSerialization

public void testComplexSerialization()
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
Tests the serialization of a user with games, friends, and other data

Throws:
java.lang.ClassNotFoundException
java.io.IOException

main

public static void main(java.lang.String[] args)