public async Task GetLatestAgreementId_WithValidIdAndExistingLegalEntity_ShouldCallServicesCorrectly()
        {
            var f = new EmployerAgreementControllerTestFixtures();

            await f.Sut.GetLatestAgreementId(f.AccountLegalEntityId, CancellationToken.None);

            f.VerifyMediatorCalledCorrectlyWithId(f.AccountLegalEntityId);
            f.VerifyGetLatestAgreementCalledCorrectly();
        }
        public async Task GetLatestAgreementId_WithValidIdAndExistingLegalEntity_ShouldReturnExpectedId()
        {
            var f = new EmployerAgreementControllerTestFixtures();

            var response = await f.Sut.GetLatestAgreementId(f.AccountLegalEntityId, CancellationToken.None);

            Assert.IsInstanceOf <OkObjectResult>(response);
            Assert.AreEqual(f.AgreementId, (long)((OkObjectResult)response).Value);
        }
        public async Task IsAgreementSignedForFeature_WithValidModelAndExistingLegalEntity_ShouldCallServicesCorrectly()
        {
            var f = new EmployerAgreementControllerTestFixtures();

            await f.Sut.IsAgreementSignedForFeature(f.AgreementSignedRequest.AccountLegalEntityId,
                                                    f.AgreementSignedRequest.AgreementFeatures, CancellationToken.None);

            f.VerifyMediatorCalledCorrectlyWithId(f.AgreementSignedRequest.AccountLegalEntityId);
            f.VerifyIsAgreementSignedCalledCorrectly();
        }
        public async Task IsAgreementSignedForFeature_WithValidModelAndExistingLegalEntity_ShouldReturnExpectedBoolean(bool expected)
        {
            var f = new EmployerAgreementControllerTestFixtures().WithAgreementIdSignedAs(expected);

            var response = await f.Sut.IsAgreementSignedForFeature(f.AgreementSignedRequest.AccountLegalEntityId,
                                                                   f.AgreementSignedRequest.AgreementFeatures, CancellationToken.None);

            Assert.IsInstanceOf <OkObjectResult>(response);
            Assert.AreEqual(expected, (bool)((OkObjectResult)response).Value);
        }
        public async Task GetLatestAgreementId_WithValidIdAndExistingLegalEntity_ShouldReturnOkayAndContent()
        {
            var f = new EmployerAgreementControllerTestFixtures();

            var response = await f.Sut.GetLatestAgreementId(f.AccountLegalEntityId, CancellationToken.None);

            Assert.AreEqual(typeof(OkObjectResult), response.GetType());
            var objectResult = (OkObjectResult)response;

            Assert.AreEqual(200, objectResult.StatusCode);
        }