public void GetPrioritys() { ProjectConfig config = new ProjectConfig(); IList<TaskPriority> prioritys; #region StrPrioritys is null prioritys = config.GetPrioritys(); Assert.That(prioritys.Count, Is.EqualTo(5)); Assert.That(prioritys.Contains(TaskPriority.Highest)); Assert.That(prioritys.Contains(TaskPriority.High)); Assert.That(prioritys.Contains(TaskPriority.Common)); Assert.That(prioritys.Contains(TaskPriority.Low)); Assert.That(prioritys.Contains(TaskPriority.Lowest)); #endregion #region StrPrioritys not null config.SetPrioritys( new List<TaskPriority> { TaskPriority.Lowest, TaskPriority.High }); prioritys = config.GetPrioritys(); Assert.That(prioritys.Count, Is.EqualTo(2)); Assert.That(prioritys.Contains(TaskPriority.Lowest)); Assert.That(prioritys.Contains(TaskPriority.High)); #endregion }
public void SetPrioritys() { ProjectConfig config = new ProjectConfig(); var prioritys = new List<TaskPriority> { TaskPriority.Highest }; config.SetPrioritys(prioritys); var result_prioritys = config.GetPrioritys(); Assert.That(result_prioritys.Count, Is.EqualTo(1)); Assert.That(result_prioritys.Contains(TaskPriority.Highest)); }