public abstract class AbstractModelTest
extends junit.framework.TestCase
Abstract class that can be inherited for the test classes. It has utility methods to create mock objects that are used by the test classes in order to create a model of objects for testing
| Constructor and Description |
|---|
AbstractModelTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachment(IAttachable attachable,
IAttachmentKey attachmentKey,
java.lang.Object object)
Add an attachment to an attachable object
|
ICompetitor |
addCompetitorToEvent(IEvent event,
java.lang.String competitorName)
Add the competitor the the event
|
ICompetitor |
addCompetitorToEvent(IEvent event,
java.lang.String competitorName,
java.util.UUID competitorId)
Add the competitor the the event
|
IRaceCompetitor |
addCompetitorToRace(IRace race,
ICompetitor competitor)
Add a competitor to a race.
|
IControlPoint |
addControlPointToControl(IControl control,
double lat,
double lon,
long timestamp)
Adds a controlpoint to a control
|
IControlRoute |
addControlRouteToRace(IRace race)
Add a route to the race
|
IControlRoute |
addControlRouteToRace(IRace race,
java.lang.String metadata)
Add a route to the race
|
IControl |
addControlToEvent(IEvent event,
java.lang.String name)
Adds a control to an event
|
IControl |
addControlToEvent(IEvent event,
java.lang.String name,
double lat,
double lon,
long timestamp)
Adds a control to an event with one control point
|
IControl |
addControlToEvent(IEvent event,
java.lang.String name,
double lat1,
double lon1,
long timestamp1,
double lat2,
double lon2,
long timestamp2)
Adds a control to an event with two control points
|
IControl |
addControlToRace(IRace race,
IControl control)
Adds a control to the race.
|
IControl |
addControlToRace(IRace race,
java.lang.String name)
Adds a control to the race.
|
IControl |
addControlToRace(IRace race,
java.lang.String name,
double lat,
double lon,
long timestamp)
Adds a control to the race.
|
IRaceCompetitor |
addRaceCompetitorToRace(IRace race,
java.lang.String name)
Adds a competitor to a race
|
IRace |
addRacetoEvent(IEvent event,
java.lang.String name)
Adds a race to an event.
|
IRace |
addRacetoEvent(IEvent event,
java.lang.String name,
java.util.UUID raceId)
Adds a race to an event.
|
IRace |
addRacetoEvent(IEvent event,
java.lang.String name,
java.util.UUID raceId,
long trackingStartTime,
long trackingEndTime,
long raceStartTime)
Adds a race to an event.
|
ICompetitor |
createCompetitor(java.lang.String competitorName)
Create a competitor
|
ICompetitor |
createCompetitor(java.util.UUID uuid,
java.lang.String competitorName)
Create a competitor
|
IControl |
createControl(java.lang.String name)
Create a control
|
IControlPoint |
createControlPoint(double lat,
double lon,
long timestamp)
Create a control point
|
IEvent |
createEvent(java.lang.String name)
Creates an event from a name.
|
IEvent |
createEvent(java.lang.String name,
java.util.UUID uuid)
Creates an event from a name.
|
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, countTestCases, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toStringpublic IEvent createEvent(java.lang.String name)
name - the name of the eventpublic IEvent createEvent(java.lang.String name, java.util.UUID uuid)
name - the name of the eventuuid - the uuid of the eventpublic void addAttachment(IAttachable attachable, IAttachmentKey attachmentKey, java.lang.Object object)
attachable - the attachable objectattachmentKey - the attachment keyobject - the object to attachpublic IRace addRacetoEvent(IEvent event, java.lang.String name)
event - the eventname - the name of the racepublic IRace addRacetoEvent(IEvent event, java.lang.String name, java.util.UUID raceId)
event - the eventname - the name of the raceUUID - the uuid of the racepublic IRace addRacetoEvent(IEvent event, java.lang.String name, java.util.UUID raceId, long trackingStartTime, long trackingEndTime, long raceStartTime)
event - the eventname - the name of the raceUUID - the uuid of the racetrackingStartTime - the tracking start timetrackingEndTime - the tracking end timeraceStartTime - the race start timepublic IRaceCompetitor addCompetitorToRace(IRace race, ICompetitor competitor)
race - the racecompetitor - the competitor to addpublic ICompetitor addCompetitorToEvent(IEvent event, java.lang.String competitorName)
event - the eventcompetitorName - the competitor namepublic ICompetitor addCompetitorToEvent(IEvent event, java.lang.String competitorName, java.util.UUID competitorId)
event - the eventcompetitorName - the competitor namecompetitorId - the competitor idpublic ICompetitor createCompetitor(java.lang.String competitorName)
name - the competitor namepublic ICompetitor createCompetitor(java.util.UUID uuid, java.lang.String competitorName)
uuid - the identifiername - the competitor namepublic IRaceCompetitor addRaceCompetitorToRace(IRace race, java.lang.String name)
race - the racename - the name of the competitorpublic IControl addControlToEvent(IEvent event, java.lang.String name)
event - the eventname - the name of the controlpublic IControlPoint addControlPointToControl(IControl control, double lat, double lon, long timestamp)
lat - the latitude value of the control pointlon - the longitude value of the control pointtimestamp - the timestamp of the control pointpublic IControl addControlToEvent(IEvent event, java.lang.String name, double lat, double lon, long timestamp)
event - the eventname - the name of the controllat - the latitude value of the first control pointlon - the longitude value of the first control pointtimestamp - the timestamp of the first control pointpublic IControl addControlToEvent(IEvent event, java.lang.String name, double lat1, double lon1, long timestamp1, double lat2, double lon2, long timestamp2)
event - the eventname - the name of the controllat1 - the latitude value of the first control pointlon1 - the longitude value of the first control pointtimestamp1 - the timestamp of the second first pointlat2 - the latitude value of the second control pointlon2 - the longitude value of the second control pointtimestamp2 - the timestamp of the first second pointpublic IControl createControl(java.lang.String name)
name - the name of the controlpublic IControlPoint createControlPoint(double lat, double lon, long timestamp)
lat - the latitude value of the control pointlon - the longitude value of the control pointtimestamp - the timestamp of the control pointpublic IControl addControlToRace(IRace race, java.lang.String name)
race - the racename - the name of the controlpublic IControl addControlToRace(IRace race, IControl control)
race - the racecontrol - the controlpublic IControl addControlToRace(IRace race, java.lang.String name, double lat, double lon, long timestamp)
race - the racename - the name of the controllat - the latitude value of the controllon - the longitude value of the controltimestamp - the timestamp of the controlpublic IControlRoute addControlRouteToRace(IRace race)
race - the racepublic IControlRoute addControlRouteToRace(IRace race, java.lang.String metadata)
race - the racemetadata - the metadata