public void Test(string[] invokedTargets, string[] expectedTargets) { TargetDefinitionLoader.GetExecutingTargets(ExecutionTestUtility.CreateBuild <TestBuild>(), invokedTargets) .Where(x => !x.Skip && x.Conditions.All(y => y())) .Select(x => x.Name) .Should().BeEquivalentTo(expectedTargets); }
public void ExecuteAllTargetsWhenConditionTrueAndBehaviorExecute() { var build = ExecutionTestUtility.CreateBuildAndExecuteDefaultTarget <TestBuild>(x => x.Execute, x => { x.OnlyWhenCondition = true; x.SwitchConditionInDependency = false; x.DependencyBehavior = DependencyBehavior.Execute; }); AssertExecutionStatus(build, ExecutionStatus.Executed, ExecutionStatus.Executed); }