示例#1
0
        public void rejDataCalculatorWithAllAndShipToRejections_Should_ReturnListOfRejectionsForAllSkusThatHaveRejectionReasonInRejectionsData_When_ThereAreMultipleDuplicateSkusInsideSameOrders()
        {
            IDataCollectorServer dcServer = null;
            IDataCollectorSap    dcSap    = null;

            IDataCollectorServiceRejections dataCollector = new DataCollectorServiceRejections(dcServer, dcSap);

            dataCollector.rdjList = getRdListWithAllAndShipToRejectionsDuplciatedSkusInOrders();
            dataCollector.zvList  = getZvListWithAllAndShipToRejectionsDuplciatedSkusInOrders();
            dataCollector.cdList  = getCdListWithAllAndShipToRejectionsDuplciatedSkusInOrders();

            IDataCalculatorServiceRejections dataCalculator = new DataCalculatorServiceRejections(null);

            List <RejectionsProperty> list         = dataCalculator.getRejectionsList(dataCollector);
            List <RejectionsProperty> expectedList = getExpectedListWithAllAndShipToRejectionsDuplciatedSkusInOrders();
            var xyar = list[0].EqualsDiff(expectedList[0]);

            CollectionAssert.AreEqual(expectedList, list);
        }
示例#2
0
        public void rejDataCalculatorWithOnlyAllRejections_Should_ReturnListOfRejectionsForAllSkusThatHaveRejectionReasonInRejectionsData_When_normalState()
        {
            IDataCollectorServer dcServer = null;
            IDataCollectorSap    dcSap    = null;

            IDataCollectorServiceRejections dataCollector = new DataCollectorServiceRejections(dcServer, dcSap);

            dataCollector.rdjList = getRdListOnlyAllRejections();
            dataCollector.cdList  = getCdListOnlyAllRejections();
            dataCollector.zvList  = getZvListOnlyAllRejections();

            IDataCalculatorServiceRejections dataCalculator = new DataCalculatorServiceRejections(null);

            List <RejectionsProperty> list         = dataCalculator.getRejectionsList(dataCollector);
            List <RejectionsProperty> expectedList = getExpectedListOnlyAllRejections();
            var xyar = list[0].EqualsDiff(expectedList[0]);

            CollectionAssert.AreEqual(expectedList, list);
        }