public void UnsuccessfulApplications()
        {
            var viewModel = new MyApplicationsViewModelBuilder().With(DashboardTestsHelper.GetApprenticeships(1, ApplicationStatuses.Unsuccessful, "Not eligible for working in UK")).Build();

            var result = new MyApplicationsViewBuilder().With(viewModel).Render();

            var dashUnsuccessful = result.GetElementbyId("dashUnsuccessful");

            dashUnsuccessful.Should().NotBeNull();

            var submittedTable = dashUnsuccessful.NextSibling.NextSibling.NextSibling.NextSibling;
            var submittedRow   = submittedTable.ChildNodes.FindFirst("tbody").ChildNodes.FindFirst("tr");
            var submittedCells = submittedRow.ChildNodes.Where(n => n.Name == "td").ToList();

            submittedCells.Count.Should().Be(3);

            var title           = submittedCells[0].ChildNodes.FindFirst("a");
            var viewApplication = submittedCells[1].ChildNodes.FindFirst("a");
            var submittedDate   = submittedCells[2].InnerText;

            title.Should().NotBeNull();
            viewApplication.Should().NotBeNull();
            submittedDate.Should().NotBeNull();

            var href = viewApplication.Attributes.First(a => a.Name == "href");

            href.Value.Should().Be("/apprenticeship/candidateapplicationfeedback/" + viewModel.UnsuccessfulApplications.First().VacancyId);
            viewApplication.InnerText.Should().Be("Read feedback");
        }
        public void SubmittedApplications()
        {
            var viewModel = new MyApplicationsViewModelBuilder().With(DashboardTestsHelper.GetApprenticeships(1, ApplicationStatuses.Submitted)).Build();

            var result = new MyApplicationsViewBuilder().With(viewModel).Render();

            var dashSubmitted = result.GetElementbyId("dashSubmitted");

            dashSubmitted.Should().NotBeNull();

            var submittedTable = dashSubmitted.NextSibling.NextSibling;
            var submittedRow   = submittedTable.ChildNodes.FindFirst("tbody").ChildNodes.FindFirst("tr");
            var submittedCells = submittedRow.ChildNodes.Where(n => n.Name == "td").ToList();

            submittedCells.Count.Should().Be(3);

            var title           = submittedCells[0].ChildNodes.FindFirst("a");
            var viewApplication = submittedCells[1].ChildNodes.FindFirst("a");
            var submittedDate   = submittedCells[2].InnerText;

            title.Should().NotBeNull();
            viewApplication.Should().NotBeNull();
            submittedDate.Should().NotBeNull();

            var href = viewApplication.Attributes.First(a => a.Name == "href");

            href.Value.Should().Be("/apprenticeship/view/" + viewModel.SubmittedApprenticeshipApplications.First().VacancyId);
            viewApplication.InnerText.Should().Be("View application");
        }