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