public async Task MoveQueuedRoutesToMainTableAsync_WhenFinishDateInAllRoutesAreBefore_NotMovingAnyRoute() { DateAndTime.NowImpl = () => new DateTime(1998, 1, 13); var routesInRoutesTableBefore = await _context.Routes.ToListAsync(); var routesInRoutesQueuedTableBefore = await _context.RoutesQueued.ToListAsync(); await _queueRepository.MoveQueuedRoutesToMainTableAsync(); var routesInRoutesTableAfter = await _context.Routes.ToListAsync(); var routesInRoutesQueuedTableAfter = await _context.RoutesQueued.ToListAsync(); Assert.AreEqual(routesInRoutesQueuedTableBefore.Count, routesInRoutesQueuedTableAfter.Count); Assert.AreEqual(0, routesInRoutesTableAfter.Count); Assert.AreEqual(routesInRoutesQueuedTableBefore, routesInRoutesQueuedTableAfter); Assert.AreEqual(routesInRoutesTableBefore, routesInRoutesTableAfter); }
public async Task MoveQueuedRoutesToMainTableAsync() => await _repository.MoveQueuedRoutesToMainTableAsync();