public void CanCallTheFormatHelperFormatDraftOutputMethodIfNotConfirmed()
        {
            _fakeGateway    = new Mock <IINeedHelpGateway>();
            _classUnderTest = new DeliveryScheduleUseCase(_fakeGateway.Object, new DriveHelper());
            var date  = new DateTime();
            var limit = 10;

            _fakeGateway.Setup(s => s.CreateTemporaryDeliveryData(limit, date)).Returns(_responseData);
            _classUnderTest.CreateDeliverySchedule(limit, false, date);
        }
        public void CallingCreateDeliveryScheduleWithConfirmedFalseReturnsAListOfFoodDeliveryDraftObjects()
        {
            var date = new DateTime();

            _fakeGateway    = new Mock <IINeedHelpGateway>();
            _classUnderTest = new DeliveryScheduleUseCase(_fakeGateway.Object, new DriveHelper());
            var limit = 10;

            _fakeGateway.Setup(s => s.CreateTemporaryDeliveryData(limit, date)).Returns(_responseData);
            var response = _classUnderTest.CreateDeliverySchedule(limit, false, date);

            response.Should().BeOfType(typeof(List <FoodDeliveryDraft>));
        }
        public void CanCallTheDatabaseCreateTemporaryDeliveryDataMethodIfNotConfirmed()
        {
            _fakeGateway    = new Mock <IINeedHelpGateway>();
            _classUnderTest = new DeliveryScheduleUseCase(_fakeGateway.Object, new DriveHelper());
            var limit       = 10;
            var spreadsheet = "test";
            var date        = new DateTime();

            _fakeGateway.Setup(s => s.CreateTemporaryDeliveryData(limit, date)).Returns(_responseData);
            _classUnderTest.CreateDeliverySchedule(limit, false, date);
            _fakeGateway.Verify(m => m.CreateTemporaryDeliveryData(limit, date), Times.Once);
            _fakeGateway.Verify(m => m.CreateDeliverySchedule(limit, spreadsheet, date), Times.Never);
        }
        public void CanCallTheDatabaseCreateDeliveryScheduleMethodIfConfirmed()
        {
            _fakeGateway     = new Mock <IINeedHelpGateway>();
            _fakeDriveHelper = new Mock <IDriveHelper>();
            _classUnderTest  = new DeliveryScheduleUseCase(_fakeGateway.Object, _fakeDriveHelper.Object);
            var limit       = 10;
            var spreadsheet = "test";
            var date        = new DateTime();

            _fakeDriveHelper.Setup(x => x.CreateSpreadsheet(It.IsAny <string>())).Returns(spreadsheet);
            _fakeGateway.Setup(s => s.CreateDeliverySchedule(limit, spreadsheet, date)).Returns(_reportData);
            _classUnderTest.CreateDeliverySchedule(limit, true, date);
            _fakeGateway.Verify(m => m.CreateDeliverySchedule(limit, spreadsheet, date), Times.Once);
            _fakeGateway.Verify(m => m.CreateTemporaryDeliveryData(limit, date), Times.Never);
        }