[Test] // ExSkip public void WorkWithAnd() { var project = new Project(DataDir + "Project2.mpp"); // gather all project tasks var coll = new ChildTasksCollector(); TaskUtils.Apply(project.RootTask, coll, 0); // create a filter condition that filters summary tasks var condition1 = new SummaryCondition(); // create a filter condition that filters not null tasks var condition2 = new NotNullCondition(); // and join them by applying <see cref="Aspose.Tasks.Util.And`1" /> condition var joinedCondition = new And <Task>(condition1, condition2); // apply the condition to the collected tasks List <Task> collection = Filter(coll.Tasks, joinedCondition); Console.WriteLine("Filtered tasks: "); foreach (var task in collection) { Console.WriteLine(" Name: " + task.Get(Tsk.Name)); // work with other properties... } // ... }
public void Test___Method_Check___Value_not_null() { var testee = new NotNullCondition() { Value = new AnyVariable() { Value = 10 } }; Assert.IsTrue(testee.Check()); }