kettricehan / jpentago

Automatically exported from code.google.com/p/jpentago
0 stars 0 forks source link

Unit Tests for JPentago model backend #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
JUnit unit tests need to be written to verify correct functionality of the
JPentago model backend architecture.

Tests need to be written for these areas:
1. Verify only valid moves can be made.
2. Verify winning/losing conditions.
3. Verify turn based functionality.
4. Verify future capabilities to plugin automated AI player to submit moves
to JPentago system.

Original issue reported on code.google.com by Daniels....@gmail.com on 9 Dec 2006 at 7:16

GoogleCodeExporter commented 9 years ago
I'm going to read up on good ways to do Unit testing for game and simulation 
frameworks.

One of the ideas for doing unit testing in a system that has large dependencies 
on
external systems or containers (like Java enterprise stuff, servlets, EJBs), 
they use
proxy objects to provide those external interfaces for their unit tests.

This allows you to write your unit tests in a decoupled fashion where you don't 
have
to setup and configure large external dependencies to just test your piece of
functionality. 

For example if you want to test the output of a servlet, you don't want to have 
to go
through the pain of setting up and configuring the entire servlet container and 
web
server. Instead you can create proxy objects that represent things like the
HttpRequest, and HttpResponse proxy object which will allow you to quickly 
create and
test your servlet.

Original comment by Daniels....@gmail.com on 9 Dec 2006 at 7:55