public void ExcelUpdatedAndDidNotDoOrders() { var filter = new UpdatedAndDidNotDoOrdersFilter { Session = DbSession }; BindObjectInstance(filter, IsPost ? ParamStore.Form : ParamStore.QueryString, "filter", AutoLoadBehavior.NullIfInvalidKey); this.RenderFile("Кто_обновлялся_и_не_делал_заказы.xls", filter.Excel()); }
public void ExportUpdatedAndDidNotDoOrdersFilterTest() { var filter = new UpdatedAndDidNotDoOrdersFilter { Session = session }; var stream = new MemoryStream(filter.Excel()); var wb = Workbook.Load(stream); var ws = wb.Worksheets.First(); Assert.That(ws.Name, Is.StringContaining("Кто обновлялся и не делал заказы")); }
public void SetUp() { client = DataMother.TestClient(x => { x.AddUser(new User(x) { Name = "test" }); x.AddUser(new User(x) { Name = "test" }); var address = x.AddAddress("Тестовый адрес"); x.Users.Each(y => y.AvaliableAddresses.Add(address)); }); session.Save(client); user = client.Users.First(); user.UserUpdateInfo.UpdateDate = DateTime.Now.AddDays(-2); user.AssignDefaultPermission(session); filter = new UpdatedAndDidNotDoOrdersFilter { Session = session }; }