public void Sync_command() { settings.LastSync = DateTime.MinValue; var stock = new Stock { Product = "Папаверин", Status = StockStatus.Available, Address = address, Quantity = 5, ReservedQuantity = 0, SupplyQuantity = 5 }; User User = session?.Query <User>()?.FirstOrDefault() ?? new User { SupportHours = "будни: с 07:00 до 19:00", SupportPhone = "тел.: 473-260-60-00", }; localSession.Save(stock); var doc = new InventoryDoc(address, User); doc.Lines.Add(new InventoryLine(doc, stock, 1, localSession)); doc.UpdateStat(); doc.Post(); localSession.Save(doc); Run(new SyncCommand()); TimeMachine.ToFuture(TimeSpan.FromMinutes(10)); doc.UnPost(); doc.Post(); Run(new SyncCommand()); }
public void Replan_job() { job.Plan(PlanPeriod.Month, 1.Day()); Assert.That(job.Run(), Is.True); job.Plan(PlanPeriod.Month, 10.Day()); TimeMachine.ToFuture(9.Days()); Assert.That(job.Run(), Is.True); }