mirror of
https://github.com/bspeice/UNCCGameDay-Test
synced 2024-11-21 15:38:15 -05:00
Add template Javadocs. Needs actual documentation yet.
This commit is contained in:
parent
84e4ab39ac
commit
4c4443b175
@ -11,8 +11,15 @@ import android.test.AndroidTestCase;
|
||||
import com.uncc.gameday.R;
|
||||
import com.uncc.gameday.twitter.TwitterClient;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* The Class TwitterClientTest.
|
||||
*/
|
||||
public class TwitterClientTest extends AndroidTestCase {
|
||||
|
||||
/**
|
||||
* Test twitter.
|
||||
*/
|
||||
public void testTwitter(){
|
||||
// Test the twitter4j logic
|
||||
String handle = this.mContext.getString(R.string.gameday_handle);
|
||||
|
@ -9,25 +9,46 @@ import com.uncc.gameday.alerts.AlertDB;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* The Class AlertDBTest.
|
||||
*/
|
||||
public class AlertDBTest extends AndroidTestCase {
|
||||
|
||||
/** The db handle. */
|
||||
private AlertDB dbHandle;
|
||||
|
||||
/**
|
||||
* Instantiates a new alert db test.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public AlertDBTest() throws Exception {
|
||||
super.setUp();
|
||||
dbHandle = new AlertDB();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see android.test.AndroidTestCase#setUp()
|
||||
*/
|
||||
public void setUp() {
|
||||
// Drop all alerts
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the num alerts.
|
||||
*
|
||||
* @return the num alerts
|
||||
*/
|
||||
private int getNumAlerts() {
|
||||
// Get the number of alerts currently in the database
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test persist.
|
||||
*/
|
||||
public void testPersist() {
|
||||
// Create an alert and persist it
|
||||
Alert a = new Alert();
|
||||
@ -39,6 +60,9 @@ public class AlertDBTest extends AndroidTestCase {
|
||||
assertEquals(1, getNumAlerts());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test persist unique.
|
||||
*/
|
||||
public void testPersistUnique() {
|
||||
// Make sure we can store alerts even when they have the same display date
|
||||
Date d = new Date();
|
||||
@ -51,6 +75,9 @@ public class AlertDBTest extends AndroidTestCase {
|
||||
assertEquals(2, getNumAlerts());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test persist multiple.
|
||||
*/
|
||||
public void testPersistMultiple() {
|
||||
Date d = new Date();
|
||||
Alert a1 = new Alert(d, "testPersistMultiple", false);
|
||||
|
@ -13,8 +13,15 @@ import com.uncc.gameday.parking.ParkingClient;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* The Class ParkingClientTest.
|
||||
*/
|
||||
public class ParkingClientTest extends AndroidTestCase{
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see android.test.AndroidTestCase#setUp()
|
||||
*/
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
@ -33,24 +40,38 @@ public class ParkingClientTest extends AndroidTestCase{
|
||||
fail("Could not connect to GameDay! Response code: " + connection.getResponseCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test fetch lots.
|
||||
*/
|
||||
public void testFetchLots() {
|
||||
ParkingClient pc = new ParkingClient(this.mContext);
|
||||
List<ParkingLot> lots = pc.listLots();
|
||||
assertTrue((lots.size() > 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test fetch lot.
|
||||
*/
|
||||
public void testFetchLot() {
|
||||
ParkingClient pc = new ParkingClient(this.mContext);
|
||||
ParkingLot lot = pc.listLot(ParkingChoice.BLUE);
|
||||
assertTrue(lot.getLocation().getValue() == ParkingChoice.BLUE.getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test fetch location.
|
||||
*/
|
||||
public void testFetchLocation() {
|
||||
ParkingClient pc = new ParkingClient(this.mContext);
|
||||
ParkingLot l = pc.listLot(ParkingChoice.GOLD);
|
||||
assertTrue((l.getCoordinate().getLatitude() != 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test rate lot.
|
||||
*
|
||||
* @throws InterruptedException the interrupted exception
|
||||
*/
|
||||
public void testRateLot() throws InterruptedException {
|
||||
ParkingClient pc = new ParkingClient(this.mContext);
|
||||
ParkingChoice choice = ParkingChoice.BLUE;
|
||||
|
@ -7,17 +7,20 @@ import java.util.List;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
import com.uncc.gameday.parking.ParkingChoice;
|
||||
import com.uncc.gameday.parking.ParkingLot;
|
||||
import com.uncc.gameday.parking.ParkingRating;
|
||||
import com.uncc.gameday.parking.RatingChoices;
|
||||
import com.uncc.gameday.registration.Attendee;
|
||||
import com.uncc.gameday.registration.RegistrationClient;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/* Tests the REST functionality */
|
||||
|
||||
/**
|
||||
* The Class RegistrationClientTest.
|
||||
*/
|
||||
public class RegistrationClientTest extends AndroidTestCase {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see android.test.AndroidTestCase#setUp()
|
||||
*/
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
@ -36,6 +39,9 @@ public class RegistrationClientTest extends AndroidTestCase {
|
||||
fail("Could not connect to GameDay! Response code: " + connection.getResponseCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test registration.
|
||||
*/
|
||||
public void testRegistration() {
|
||||
// Register a new user, and make sure that they can be retrieved correctly
|
||||
Attendee a = new Attendee();
|
||||
@ -52,6 +58,9 @@ public class RegistrationClientTest extends AndroidTestCase {
|
||||
assertTrue((r.getId() != 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test list users.
|
||||
*/
|
||||
public void testListUsers() {
|
||||
// Test listing all users
|
||||
RegistrationClient rc = new RegistrationClient(this.mContext);
|
||||
|
Loading…
Reference in New Issue
Block a user