Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public async void Should_Success_Get_Report_Data()
        {
            var serviceProvider = new Mock <IServiceProvider>();
            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.GetNewDataLocalSupplier("unit-test");

            await URNFacade.Create(urn, "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;
            var Response = Facade.GetReport(null, null, null, DateFrom, DateTo);

            Assert.NotEqual(Response.Item2, 0);
        }
Exemplo n.º 3
0
        public async void Should_Success_Get_Report_Total_Purchase_By_Units_Null_Data_Excel()
        {
            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");

            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);
        }