示例#1
0
        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);
        }
示例#2
0
        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);
        }