FakeTask class definition.
Inheritance: System.Threading.Tasks.TaskBase
Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the CompositeTaskFacts class.
        /// </summary>
        public CompositeTaskFacts()
        {
            this.tasks = new ITask[TaskCount];

            for (int i = 0; i < TaskCount; ++i)
            {
                var task = new FakeTask();

                task.ExecuteFunction = this.TaskCounterFunction;
                task.VerifyFunction = this.TaskCounterFunction;

                this.tasks[i] = task;
            }
        }
Exemple #2
0
            public void TwoTasksShouldNotHaveTheSameDefaultName(ITask task2)
            {
                "And another task"
                    ._(() => task2 = new FakeTask());

                "Then the task names should not be the same"
                    ._(() => this.task.Name.Should().NotBe(task2.Name));
            }
Exemple #3
0
            public void NamedTaskShouldHaveCorrectName()
            {
                var anyString = this.Fixture.Create<string>();
                var task = new FakeTask(anyString);

                Assert.Equal(anyString, task.Name);
            }