public async void Should_Success_Get_Report_Data() { var serviceProvider = new Mock <IServiceProvider>(); ExternalPurchaseOrder externalPurchaseOrder = await EPODataUtil.GetTestData("Unit test"); DeliveryOrder deliveryOrder = await DODataUtil.GetTestData("unit-test"); UnitReceiptNote urn = await DataUtil.GetTestData3("unit-test"); UnitReceiptNoteFacade facade = new UnitReceiptNoteFacade(serviceProvider.Object, _dbContext(GetCurrentMethod())); await _dataUtil(facade, GetCurrentMethod()).GetTestData("unit-test"); //UnitPaymentOrder upo = await UPODataUtil.GetTestData(); //await UPOFacade.Create(upo, "unit-test", false, 7); var DateFrom = DateTime.Now; DateFrom = DateFrom.Date; var DateTo = DateTime.Now; DateTo = DateTo.Date; if (externalPurchaseOrder != null && deliveryOrder != null && urn != null) { var Response = Facade.GetReport(null, null, null, DateFrom, DateTo); Assert.NotEqual(Response.Item2, 0); } }
public async void Should_Success_Get_Report_Total_Purchase_By_Units_Null_Data_Excel() { ExternalPurchaseOrder externalPurchaseOrder = await EPODataUtil.GetTestData("Unit test"); DeliveryOrder deliveryOrder = await DODataUtil.GetTestData("unit-test"); UnitReceiptNote urn = await DataUtil.GetTestData2("unit-test"); var DateFrom = DateTime.Now; DateFrom = DateFrom.Date; var DateTo = DateTime.Now; DateTo = DateTo.Date; var Response = IPRFacade.GenerateExcel(null, null, null, DateFrom, DateTo); Assert.IsType(typeof(System.IO.MemoryStream), Response); }
//public async void Should_Success_Get_Report_Data() //{ // ExternalPurchaseOrder externalPurchaseOrder = await EPODataUtil.GetNewData("unit-test"); // await EPOFacade.Create(externalPurchaseOrder, "unit-test", 7); // DeliveryOrder deliveryOrder = await DODataUtil.GetNewData("unit-test"); // await DOFacade.Create(deliveryOrder, "unit-test"); // UnitReceiptNote urn = await DataUtil.GetNewDatas("unit-test"); // await Facade.Create(urn, "unit-test"); // //UnitPaymentOrder upo = await UPODataUtil.GetTestData(); // //await UPOFacade.Create(upo, "unit-test", false, 7); // var DateFrom = DateTime.Now; // DateFrom = DateFrom.Date; // var DateTo = DateTime.Now; // DateTo = DateTo.Date; // var Response = IPRFacade.GetReport(null, null,null ,DateFrom,DateTo); // Assert.NotEqual(Response.Item2, 0); //} public async void Should_Success_Get_Report_Data() { ExternalPurchaseOrder externalPurchaseOrder = await EPODataUtil.GetTestData("Unit test"); DeliveryOrder deliveryOrder = await DODataUtil.GetTestData("unit-test"); UnitReceiptNote urn = await DataUtil.GetTestData2("unit-test"); var DateFrom = DateTime.Now; DateFrom = DateFrom.Date; var DateTo = DateTime.Now; DateTo = DateTo.Date; var Response = IPRFacade.GetReport(null, null, null, DateFrom, DateTo); Assert.NotEqual(Response.Item2, 0); }