public void TestSetup()
 {
     timeMerger = new TimeMergerModel();
     timer = new TimerModel();
     checkpoint1 = new CheckpointModel("Checkpoint1", timer, 1);
     checkpoint2 = new CheckpointModel("Checkpoint2", timer, 2);
     timer.CurrentCheckpointId = timer.GetFirstCheckpointId();
     timer.CheckpointRuntimes.Add(timer.CurrentCheckpointId, new Dictionary<int, int>());
     checkpointOrderModel = new CheckpointOrderModel();
 }
 public void TestSetup()
 {
     timeMerger = new TimeMergerModel();
     timer = new TimerModel();
     eventModel = new EventModel("TestEvent", DateTime.Today);
     eventModel.Save();
     race = new RaceModel("SomeRace", new DateTime(2007, 10, 3));
     race.EventId = eventModel.EventId;
     race.Save();
     checkpoint1 = new CheckpointModel("Checkpoint1", timer, race, 1);
     checkpoint2 = new CheckpointModel("Checkpoint2", timer, race, 2);
     timer.CurrentCheckpointId = timer.GetFirstCheckpointId();
     timer.CheckpointRuntimes.Add(timer.CurrentCheckpointId, new Dictionary<int, int>());
     checkpointOrderModel = new CheckpointOrderModel();
 }
Example #3
0
 public ActionResult Index()
 {
     ViewBag.Events = EventModel.GetEvents();
     ViewBag.Races = new List<RaceModel>();
     ViewBag.Timers = new List<Timer>();
     ViewBag.Checkpoints = new List<Checkpoint>();
     var dicStartnumbers = new Dictionary<int, int>();
     ViewBag.Startnumbers = dicStartnumbers;
     var dicTimestamps = new Dictionary<int, int>();
     ViewBag.Timestamps = dicTimestamps;
     var timeMergeModel = new TimeMergerModel();
     var dicMergedlist = new Dictionary<int, int>();
     ViewBag.Mergedlist = dicMergedlist;
     return View(timeMergeModel);
 }