public void TestValueRetrieveString() { // setup handler and add task Threadnaught handler = new Threadnaught(); string taskString = "blah blah blah"; int task1 = handler.AddTask(new Task <string>(() => WasteTimeString(1, taskString))); // get the value Assert.AreEqual(handler.GetTaskValue <string>(task1), taskString); }
public void TestValueRetrieveInt() { // setup handler and add task Threadnaught handler = new Threadnaught(); int taskNumber = 1; int task1 = handler.AddTask(new Task <int>(() => WasteTimeInt(taskNumber))); // get the value Assert.AreEqual(handler.GetTaskValue <int>(task1), taskNumber); }