Exemple #1
0
        public static async Task ActionFunctionCalledWhenExecuted()
        {
            bool wasCalled = false;
            var  task      = new ActionTask(() => wasCalled = true);

            var context = Substitute.For <ITaskContext>();

            await task.ExecuteAsync(context);

            wasCalled.Should().BeTrue();
        }
Exemple #2
0
        public static async Task ActionFunctionCalledWhenExecuted()
        {
            bool wasCalled = false;
            var task = new ActionTask(() => wasCalled = true);

            var context = Substitute.For<ITaskContext>();

            await task.ExecuteAsync(context);

            wasCalled.Should().BeTrue();
        }