Exemple #1
0
        public static void ExecutingAnInlineTask(ITaskBuilder builder, bool executed)
        {
            "Given a default task with an inline task"
            .f(() => builder = ScriptCs.Require <Bau>().Do(() =>
            {
                var task = new BauCore.BauTask();
                task.Actions.Add(() => executed = true);
                task.Execute();
            }));

            "When I run the builder"
            .f(() => builder.Run());

            "Then the inline task is executed"
            .f(() => executed.Should().BeTrue());
        }
Exemple #2
0
        public static void ExecutingAnInlineTask(ITaskBuilder builder, bool executed)
        {
            "Given a default task with an inline task"
                .f(() => builder = ScriptCs.Require<Bau>().Do(() =>
                {
                    var task = new BauCore.BauTask();
                    task.Actions.Add(() => executed = true);
                    task.Execute();
                }));

            "When I run the builder"
                .f(() => builder.Run());

            "Then the inline task is executed"
                .f(() => executed.Should().BeTrue());
        }