public void TestMergedList() { AppDomain.CurrentDomain.SetData("DataDirectory", Directory.GetCurrentDirectory()); var dbContext = new GoFastDbContext(); dbContext.Database.Initialize(false); var model = new TransportTimesModel(dbContext, null); var task = model.MyTransportTimes(); Assert.IsTrue(task.Wait(4000), "timed out waiting on external service"); foreach (var journey in task.Result) { Console.WriteLine(journey.Key); foreach (var time in journey.Value) Console.WriteLine($"{time.Service} to {time.Destination}: {time.DueRelative} ({time.DueAbsolute})"); } }
public TransportTimesModel(GoFastDbContext db, IIdentity identity) { dbContext = db; this.identity = identity; }