/// <summary> /// <see cref="Microsoft.Samples.NLayerApp.DistributedServices.MainModule.IMainModuleService"/> /// </summary> /// <param name="fromDate"><see cref="Microsoft.Samples.NLayerApp.DistributedServices.MainModule.IMainModuleService"/></param> /// <param name="toDate"><see cref="Microsoft.Samples.NLayerApp.DistributedServices.MainModule.IMainModuleService"/></param> /// <returns><see cref="Microsoft.Samples.NLayerApp.DistributedServices.MainModule.IMainModuleService"/></returns> public List <Order> GetOrdersByDates(DateTime?fromDate, DateTime?toDate) { //Resolve root dependencies and perform operations ISalesManagementService salesManagement = IoCFactory.Instance.CurrentContainer.Resolve <ISalesManagementService>(); return(salesManagement.FindOrdersByDates(fromDate, toDate)); }
public void FindOrdersByDates_Invoke_test() { //Arrange ISalesManagementService orderService = IoCFactory.Instance.CurrentContainer.Resolve <ISalesManagementService>(); DateTime initDate = new DateTime(2001, 1, 1); DateTime endDate = new DateTime(2010, 5, 1); //act List <Order> orders = orderService.FindOrdersByDates(initDate, endDate); //Assert Assert.IsNotNull(orders); Assert.IsTrue(orders.Count > 0); }