Exemple #1
0
        public async Task ThenCallsProviderRelationshipsApiClient()
        {
            var fixture = new SelectEmployerViewModelMapperFixture();

            await fixture.Act();

            fixture.Verify_ProviderRelationshipsApiClientWasCalled_Once();
        }
Exemple #2
0
        public async Task ThenCorrectlyMapsApiResponseToViewModel()
        {
            var fixture = new SelectEmployerViewModelMapperFixture();

            var result = await fixture.Act();

            fixture.Assert_SelectEmployerViewModelCorrectlyMapped(result);
        }
Exemple #3
0
        public async Task ThenCorrectlyMapsEmptyApiResponseToViewModel()
        {
            var fixture = new SelectEmployerViewModelMapperFixture().WithNoMatchingEmployers();

            var result = await fixture.Act();

            fixture.Assert_ListOfEmployersIsEmpty(result);
        }
Exemple #4
0
        public async Task ThenFilterIsAppliedCorrectlyForEmployerName()
        {
            var fixture = new SelectEmployerViewModelMapperFixture();

            fixture.AddListOfAccountProviderLegalEntities()
            .WithRequest(new SelectEmployerRequest
            {
                ProviderId = 123,
                SearchTerm = "atestaccountlegal"
            });

            var result = await fixture.Act();

            fixture.Assert_FilterIsAppliedCorrectlyForEmployerName(result);
        }
Exemple #5
0
        public async Task ThenSortIsAppliedCorrectlyForEmployerAccountName(bool reverseSort)
        {
            var fixture = new SelectEmployerViewModelMapperFixture();

            fixture.AddListOfAccountProviderLegalEntities()
            .WithRequest(new SelectEmployerRequest
            {
                ProviderId  = 123,
                SortField   = SelectEmployerFilterModel.EmployerAccountNameConst,
                ReverseSort = reverseSort
            });

            var result = await fixture.Act();

            fixture.Assert_SortIsAppliedCorrectlyForEmployerAccountName(result, reverseSort);
        }