public void SubjectRepository_GetByPage_GetByStatusShouldReturnValue() { SubjectRepository repository = new SubjectRepository(); var search = new DtoQuestionSearch() { SubjectStatus = SubjectStatusEnum.合格 }; var result = repository.GetByPage(search); Assert.IsNotNull(result); foreach (var item in result) { if (item.Ysj_Status != (int)SubjectStatusEnum.合格) { Assert.Fail(); } } }
public void SubjectRepository_GetByPage_GetByDifficultyShouldReturnValue() { SubjectRepository repository = new SubjectRepository(); var search = new DtoQuestionSearch() { Difficulty = DifficultyEnum.较易 }; var result = repository.GetByPage(search); Assert.IsNotNull(result); foreach (var item in result) { if (item.Ysj_Difficulty != (int)DifficultyEnum.较易) { Assert.Fail(); } } }