using System; using System.Collections.Generic; using System.Text; using NUnit.Framework; using TaskExplorer.Data; namespace TaskExplorer.Tests { [TestFixture] public class Class1 { [Test] public void TestTask() { Task task = new Task("Do the washing up", "hello"); Assert.AreEqual("Do the washing up", task.Name); } [Test] public void TestStore() { Store store = new Store(); Task task1 = store.CreateTask("Move the boxes"); Assert.AreEqual("Move the boxes", task1.Name); List task1prereq = new List(task1.PreRequisites); Assert.AreEqual(0, task1prereq.Count); List task1req = new List(task1.Requisites); Assert.AreEqual(0, task1req.Count); Task task2 = store.CreateTask("Hoover"); Assert.AreEqual("Hoover", task2.Name); task2.AddPreRequisite(task1); List task2prereq = new List(task2.PreRequisites); Assert.AreEqual(1, task2prereq.Count); Assert.AreEqual(task1, task2prereq[0]); List task2req = new List(task2.Requisites); Assert.AreEqual(0, task2req.Count); } } }