public async Task GetSectorsViewModel_returns_ViewModel() { int sequenceNumber = SequenceIds.DeliveringApprenticeshipTraining; int sectionNumber = SectionIds.DeliveringApprenticeshipTraining.YourSectorsAndEmployees; string pageId = RoatpWorkflowPageIds.YourSectorsAndEmployeesStartingPageId; var userId = _user.UserId(); _chosenSectors.Add(new ClarificationSector { PageId = "1", Title = "page 1 title", Status = "Pass" }); _chosenSectors.Add(new ClarificationSector { PageId = "2", Title = "page 2 title" }); _ukprn = "1234"; _organisationName = "org name"; _providerRouteName = "Main"; var application = new Apply { ApplicationId = _applicationId, ApplyData = new ApplyData { ApplyDetails = new ApplyDetails { UKPRN = _ukprn, OrganisationName = _organisationName, ProviderRouteName = _providerRouteName, ApplicationSubmittedOn = _applicationSubmittedOn } } }; var assessorPage = new ClarificationPage { Caption = _clarificationPageCaption }; _applicationApiClient.Setup(x => x.GetApplication(_applicationId)).ReturnsAsync(application); _clarificationApiClient.Setup(x => x.GetClarificationPage(_applicationId, sequenceNumber, sectionNumber, pageId)) .ReturnsAsync(assessorPage); _clarificationApiClient.Setup(x => x.GetClarificationSectors(_applicationId, userId)) .ReturnsAsync(_chosenSectors); var request = new GetSectorsRequest(_applicationId, userId); var actualViewModel = await _orchestrator.GetSectorsViewModel(request); Assert.That(actualViewModel, Is.Not.Null); var expectedViewModel = new ApplicationSectorsViewModel { ApplyLegalName = _organisationName, Ukprn = _ukprn, SelectedSectors = _chosenSectors, ApplicationId = _applicationId, ApplicationRoute = _providerRouteName, SubmittedDate = _applicationSubmittedOn, Caption = _clarificationPageCaption, Heading = SectionIds.DeliveringApprenticeshipTraining.YourSectorsAndEmployeesHeading }; Assert.AreEqual(JsonConvert.SerializeObject(actualViewModel), JsonConvert.SerializeObject(expectedViewModel)); }