public void TryGetCategoryState_ReturnsTrue_IfCategory() { var sut = new FilteredAssessmentState { CurrentFilterAssessmentCode = "AC", JobCategoryStates = new List <JobCategoryState> { new JobCategoryState("AC", "Animal Care", "QS-1", new [] { new JobCategorySkill { Skill = "D", QuestionNumber = 4, QuestionId = "4" }, new JobCategorySkill { Skill = "A", QuestionNumber = 1, QuestionId = "1" } }, "1") } }; Assert.True(sut.TryGetJobCategoryState("AC", out var cat)); Assert.NotNull(cat); Assert.Equal("QS-1", cat.QuestionSetVersion); }
public void TryGetCategoryState_ReturnsFalse_IfNoCategory() { var sut = new FilteredAssessmentState(); Assert.False(sut.TryGetJobCategoryState("GS", out var _)); }