示例#1
0
        public void ShouldUpdateLatestReturn_When_LatestReturn_is_null_returns_true()
        {
            // Setup
            var testOrg = new Organisation {
                LatestReturn = null
            };
            var testSnapshotYear = 2000;

            var sharedBusinessLogic = UiTestHelper.DIContainer.Resolve <ISharedBusinessLogic>();

            var testSubmissionService = new SubmissionService(sharedBusinessLogic, Mock.Of <ISubmissionBusinessLogic>(), Mock.Of <IScopeBusinessLogic>(), Mock.Of <IDraftFileBusinessLogic>());
            var testPresenter         = new SubmissionPresenter(testSubmissionService, ConfigHelpers.SubmissionOptions, null);

            // Assert
            bool actual = testPresenter.ShouldUpdateLatestReturn(testOrg, testSnapshotYear);

            Expect(actual);
        }
示例#2
0
        public void ShouldUpdateLatestReturn_when_LatestReturnYear_greaterthan_ReportingStartYear_returns_false()
        {
            // Setup
            var testOrg = new Organisation {
                LatestReturn = new Return {
                    AccountingDate = new DateTime(2018, 4, 5)
                }
            };
            var testSnapshotYear = 2017;

            var sharedBusinessLogic = UiTestHelper.DIContainer.Resolve <ISharedBusinessLogic>();

            var testSubmissionService = new SubmissionService(sharedBusinessLogic, Mock.Of <ISubmissionBusinessLogic>(), Mock.Of <IScopeBusinessLogic>(), Mock.Of <IDraftFileBusinessLogic>());
            var testPresenter         = new SubmissionPresenter(testSubmissionService, ConfigHelpers.SubmissionOptions, null);

            // Assert
            bool actual = testPresenter.ShouldUpdateLatestReturn(testOrg, testSnapshotYear);

            Expect(actual == false);
        }