public void Should_Success_Get_Data_By_Id()
        {
            var mockFacade = new Mock <IUnitPaymentQuantityCorrectionNoteFacade>();

            mockFacade.Setup(x => x.ReadById(It.IsAny <int>()))
            .Returns(Model);

            var mockFacadeSpb = new Mock <IUnitPaymentOrderFacade>();

            mockFacadeSpb.Setup(x => x.Read(1, 25, "{}", null, "{}"))
            .Returns(Tuple.Create(new List <UnitPaymentOrder>(), 0, new Dictionary <string, string>()));

            var mockMapper = new Mock <IMapper>();

            UnitPaymentQuantityCorrectionNoteController controller = new UnitPaymentQuantityCorrectionNoteController(GetServiceProvider().Object, mockMapper.Object, mockFacade.Object, mockFacadeSpb.Object);
            var response = controller.Get(It.IsAny <int>());

            Assert.Equal((int)HttpStatusCode.OK, GetStatusCode(response));
        }
        public void Should_Error_Get_All_Data()
        {
            var mockFacade = new Mock <IUnitPaymentQuantityCorrectionNoteFacade>();

            mockFacade.Setup(x => x.Read(1, 25, "{}", null, "{}"))
            .Returns(Tuple.Create(new List <UnitPaymentCorrectionNote>(), 0, new Dictionary <string, string>()));

            var mockFacadeSpb = new Mock <IUnitPaymentOrderFacade>();

            mockFacadeSpb.Setup(x => x.Read(1, 25, "{}", null, "{}"))
            .Returns(Tuple.Create(new List <UnitPaymentOrder>(), 0, new Dictionary <string, string>()));

            var mockMapper = new Mock <IMapper>();

            UnitPaymentQuantityCorrectionNoteController controller = new UnitPaymentQuantityCorrectionNoteController(GetServiceProvider().Object, mockMapper.Object, mockFacade.Object, mockFacadeSpb.Object);
            var response = controller.Get(1, 25, "{}", null, "{}");

            Assert.Equal((int)HttpStatusCode.InternalServerError, GetStatusCode(response));
        }