public void GetTasks() { CopyTargetBase(@"Correct"); var tasks = _tasksReader.Read().ToList(); Assert.That(tasks, Is.Not.Null); Assert.That(tasks.Count, Is.EqualTo(2)); var firstTask = tasks.First(); Assert.That(firstTask.Options.ToList()[1], Is.EqualTo(@"Correct 1.")); Assert.That(firstTask.Options.ToList()[0], Is.EqualTo(@"Incorrect 1.1.")); Assert.That(firstTask.Options.ToList()[2], Is.EqualTo(@"Incorrect 1.2.")); Assert.That(firstTask.Question, Is.EqualTo(@"Question 1")); Assert.That(firstTask.Explanation, Is.EqualTo(@"Explanation 1.")); Assert.That(firstTask.TargetMembers.Count(), Is.EqualTo(3)); Assert.That(firstTask.TargetMembers.Contains(MemberType.Conclusive)); Assert.That(firstTask.TargetMembers.Contains(MemberType.Conclusive)); Assert.That(firstTask.TargetMembers.Contains(MemberType.Observer)); var secondTask = tasks.Last(); Assert.That(secondTask.Options.ToList()[0], Is.EqualTo(@"Correct 2.")); Assert.That(secondTask.Options.ToList()[1], Is.EqualTo(@"Incorrect 2.1.")); Assert.That(secondTask.Options.ToList()[2], Is.EqualTo(@"Incorrect 2.2.")); Assert.That(secondTask.Question, Is.EqualTo(@"Question 2")); Assert.That(secondTask.Explanation, Is.EqualTo(@"Explanation 2.")); Assert.That(secondTask.TargetMembers.Count(), Is.EqualTo(1)); Assert.That(secondTask.TargetMembers.Contains(MemberType.Conclusive)); }
/// <inheritdoc /> public void FillStorage() { _tasks = _tasksReader.Read().ToList(); }