public void Get_post_learning_assessment_should_not_have_other_sections_in_course_when_other_section_has_no_diagnostic_assessment_path() { using (new TransactionScope()) { // Given const int customisationId = 5694; const int candidateId = 1; const int sectionId = 103; // Make this course assessed courseContentTestHelper.UpdateIsAssessed(customisationId, true); // Remove assessment paths from other sections int[] otherSections = { 104, 105, 106, 107, 108, 109, 110, 111 }; otherSections.ToList().ForEach(section => { sectionContentTestHelper.UpdateDiagnosticAssessmentPath(section, null); sectionContentTestHelper.UpdatePostLearningAssessmentPath(section, null); }); // When var result = postLearningAssessmentService.GetPostLearningAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeFalse(); } }
public void Get_tutorial_information_should_not_have_otherSectionsExist_when_other_section_has_no_diagnostic_assessment_path() { using (new TransactionScope()) { // Given const int customisationId = 5694; const int candidateId = 1; const int sectionId = 103; const int tutorialId = 322; // Make this tutorial viewable tutorialContentTestHelper.UpdateTutorialStatus(tutorialId, customisationId, 1); // Remove diagnostic assessment paths from other sections int[] otherSections = { 104, 105, 106, 107, 108, 109, 110, 111 }; otherSections.ToList().ForEach(section => sectionContentTestHelper.UpdateDiagnosticAssessmentPath(section, null) ); // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeFalse(); } }
public void Get_tutorial_information_should_not_have_otherSectionsExist_when_other_section_is_full_of_archived_tutorials() { using (new TransactionScope()) { // Given const int customisationId = 17456; const int candidateId = 210934; const int sectionId = 664; const int tutorialId = 2717; // The tutorials of what would be the next section, 668 // This is the only other section on this course tutorialContentTestHelper.ArchiveTutorial(2713); tutorialContentTestHelper.ArchiveTutorial(2714); tutorialContentTestHelper.ArchiveTutorial(2715); tutorialContentTestHelper.ArchiveTutorial(2716); // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeFalse(); } }
public void Get_diagnostic_assessment_should_have_other_sections_in_course_when_other_section_only_has_diagnostic_assessment() { // Given const int customisationId = 5694; const int candidateId = 1; const int sectionId = 103; // When var result = diagnosticAssessmentDataService.GetDiagnosticAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeTrue(); }
public void Get_diagnostic_assessment_should_not_have_other_sections_in_course_when_only_section_not_archived_in_course() { // Given const int customisationId = 21727; const int candidateId = 210934; const int sectionId = 1806; // When var result = diagnosticAssessmentDataService.GetDiagnosticAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeFalse(); }
public void Get_post_learning_assessment_should_have_other_sections_in_course_when_other_sections_only_have_post_learning_assessment() { // Given const int customisationId = 10820; const int candidateId = 1; const int sectionId = 104; // When var result = postLearningAssessmentService.GetPostLearningAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeTrue(); }
public void Get_post_learning_assessment_should_not_have_other_sections_in_course_when_only_section_in_application() { // Given const int customisationId = 7967; const int candidateId = 11; const int sectionId = 210; // When var result = postLearningAssessmentService.GetPostLearningAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeFalse(); }
public void Get_tutorial_information_should_have_otherSectionsExist_when_other_sections_only_have_post_learning_assessment() { // Given const int customisationId = 10820; const int candidateId = 1; const int sectionId = 104; const int tutorialId = 326; // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeTrue(); }
public void Get_tutorial_information_should_not_have_otherSectionsExist_when_only_section_in_application() { // Given const int customisationId = 7967; const int candidateId = 11; const int sectionId = 210; const int tutorialId = 885; // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeFalse(); }
public void Get_tutorial_information_should_have_otherSectionsExist_if_at_end_of_list() { // Given const int customisationId = 15853; const int candidateId = 1; const int sectionId = 386; const int tutorialId = 1485; // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeTrue(); }
public void Get_tutorial_information_should_have_other_sections_in_course_if_last_section_in_course() { // Given const int candidateId = 1; const int customisationId = 1379; const int sectionId = 82; const int tutorialId = 94; // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeTrue(); }
public void Get_post_learning_assessment_should_have_other_sections_in_course_when_shared_section_number(int sectionId) { using (new TransactionScope()) { // Given const int customisationId = 27440; const int candidateId = 207900; sectionContentTestHelper.UpdateSectionNumber(3001, 16); // When var result = postLearningAssessmentService.GetPostLearningAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeTrue(); } }
public void Get_diagnostic_assessment_should_have_other_sections_in_course_when_shared_section_number(int sectionId) { using (new TransactionScope()) { // Given const int customisationId = 26254; const int candidateId = 286695; sectionContentTestHelper.UpdateSectionNumber(2475, 7); // When var result = diagnosticAssessmentDataService.GetDiagnosticAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeTrue(); } }
public void Get_diagnostic_assessment_should_have_other_sections_in_course_when_only_other_section_shares_section_number() { using (new TransactionScope()) { // Given const int customisationId = 17456; const int candidateId = 210934; const int sectionId = 664; sectionContentTestHelper.UpdateSectionNumber(668, 1); // Section 664 also has SectionNumber 1, and is // the only other section on the course // When var result = diagnosticAssessmentDataService.GetDiagnosticAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeTrue(); } }
public void Get_post_learning_assessment_should_not_have_other_sections_in_course_when_only_section_not_archived_in_course() { using (new TransactionScope()) { // Given const int customisationId = 21727; const int candidateId = 210934; const int sectionId = 1806; // Make this course assessed courseContentTestHelper.UpdateIsAssessed(customisationId, true); // When var result = postLearningAssessmentService.GetPostLearningAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeFalse(); } }
public void Get_tutorial_information_should_have_otherSectionsExist_when_shared_section_number( int sectionId, int tutorialId ) { using (new TransactionScope()) { // Given const int customisationId = 24057; const int candidateId = 1; sectionContentTestHelper.UpdateSectionNumber(2195, 10); // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeTrue(); } }
public void Get_tutorial_information_should_have_otherSectionsExist_when_only_other_section_shares_section_number() { using (new TransactionScope()) { // Given const int customisationId = 17456; const int candidateId = 210934; const int sectionId = 664; const int tutorialId = 2718; sectionContentTestHelper.UpdateSectionNumber(668, 1); // Section 664 also has SectionNumber 1, and is // the only other section on the course // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeTrue(); } }
public void Get_tutorial_information_should_not_have_otherSectionsExist_when_only_section_not_archived_in_course() { using (new TransactionScope()) { // Given const int customisationId = 21727; const int candidateId = 210934; const int sectionId = 1806; const int tutorialId = 8621; // Make this tutorial viewable tutorialContentTestHelper.UpdateTutorialStatus(tutorialId, customisationId, 1); // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeFalse(); } }
public void Get_tutorial_information_should_have_otherSectionsExist_when_other_section_only_has_diagnostic_assessment() { using (new TransactionScope()) { // Given const int customisationId = 5694; const int candidateId = 1; const int sectionId = 103; const int tutorialId = 322; // Make this tutorial viewable tutorialContentTestHelper.UpdateTutorialStatus(tutorialId, customisationId, 1); // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeTrue(); } }
public void Get_tutorial_information_should_not_have_otherSectionsExist_when_other_section_has_no_post_learning_assessment_path() { using (new TransactionScope()) { // Given const int customisationId = 10820; const int candidateId = 1; const int sectionId = 104; const int tutorialId = 326; // Remove post learning assessment paths from other sections int[] otherSections = { 103, 105, 106, 107, 108, 109, 110, 111 }; otherSections.ToList().ForEach(section => sectionContentTestHelper.UpdatePostLearningAssessmentPath(section, null) ); // When var tutorial = tutorialContentDataService.GetTutorialInformation(candidateId, customisationId, sectionId, tutorialId); // Then tutorial.Should().NotBeNull(); tutorial !.OtherSectionsExist.Should().BeFalse(); } }
public void Get_post_learning_assessment_should_not_have_other_sections_in_course_when_other_section_is_full_of_archived_tutorials() { using (new TransactionScope()) { // Given const int customisationId = 17456; const int candidateId = 210934; const int sectionId = 664; // The tutorials of what would be the next section, 668 // This is the only other section on this course tutorialContentTestHelper.ArchiveTutorial(2713); tutorialContentTestHelper.ArchiveTutorial(2714); tutorialContentTestHelper.ArchiveTutorial(2715); tutorialContentTestHelper.ArchiveTutorial(2716); // When var result = postLearningAssessmentService.GetPostLearningAssessment(customisationId, candidateId, sectionId); // Then result.Should().NotBeNull(); result !.OtherSectionsExist.Should().BeFalse(); } }