Пример #1
0
        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);
            }
        }
Пример #2
0
        public async Task Should_Success_Get_Report_Generate_Data_Excel_Not_Found()
        {
            ExternalPurchaseOrder modelEPO = await EPODataUtil.GetTestData("Unit test");

            var Response = FacadeGenerateData.GenerateExcel(DateTime.MinValue, DateTime.MinValue, 7);

            Assert.IsType(typeof(System.IO.MemoryStream), Response);
        }
        public async void Should_Success_Get_Report_POEDODuration_Excel()
        {
            var model = await EPODataUtil.GetTestData("Unit test");

            var model2 = await DataUtil.GetTestData("Unit test");

            var model3 = await DODataUtil.GetTestData2("Unit test");

            var model4 = await PRDataUtil.GetTestData("Unit test");

            var Response = Facade.GenerateExcelEPODODuration(model.UnitId, "31-60 hari", null, null, 7);

            Assert.IsType(typeof(System.IO.MemoryStream), Response);
        }
Пример #4
0
        public async Task Should_Success_Get_Report_POEDODuration_Excel_Null_Parameter()
        {
            var model = await EPODataUtil.GetTestData("Unit test");

            var model2 = await DataUtil.GetTestData("Unit test");

            var model3 = await DODataUtil.GetTestData3("Unit test");

            var model4 = await PRDataUtil.GetTestData("Unit test");

            var Response = Facade.GenerateExcelEPODODuration("", "61-90 hari", null, null, 7);

            Assert.IsType(typeof(System.IO.MemoryStream), Response);
        }
Пример #5
0
        public async void Should_Success_Get_Report_POExDODuration_Null_Parameter()
        {
            var model = await EPODataUtil.GetTestData("Unit test");

            var model2 = await DataUtil.GetTestData("Unit test");

            var model3 = await DODataUtil.GetTestData3("Unit test");

            var model4 = await PRDataUtil.GetTestData("Unit test");

            var Response = Facade.GetEPODODurationReport("", "61-90 hari", null, null, 1, 25, "{}", 7);

            Assert.NotEqual(Response.Item2, 0);
        }
Пример #6
0
        public async void Should_Success_Get_Report_POExDODuration_Data()
        {
            var model = await EPODataUtil.GetTestData("Unit test");

            var model2 = await DataUtil.GetTestData("Unit test");

            var model3 = await DODataUtil.GetTestData2("Unit test");

            var model4 = await PRDataUtil.GetTestData("Unit test");

            var Response = Facade.GetEPODODurationReport(model.UnitId, "31-60 hari", null, null, 1, 25, "{}", 7);

            Assert.NotEqual(Response.Item2, 0);
        }
Пример #7
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);
        }
Пример #8
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);
        //}
        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);
        }