Пример #1
0
        public void SetCondition()
        {
            ProjectRootElement    project = ProjectRootElement.Create();
            ProjectTargetElement  target  = project.AddTarget("t");
            ProjectOnErrorElement onError = project.CreateOnErrorElement("et");

            target.AppendChild(onError);
            Helpers.ClearDirtyFlag(project);

            onError.Condition = "c";

            Assert.AreEqual("c", onError.Condition);
            Assert.AreEqual(true, project.HasUnsavedChanges);
        }
Пример #2
0
        public void SetExecuteTargets()
        {
            ProjectRootElement    project = ProjectRootElement.Create();
            ProjectTargetElement  target  = project.AddTarget("t");
            ProjectOnErrorElement onError = project.CreateOnErrorElement("et");

            target.AppendChild(onError);
            Helpers.ClearDirtyFlag(project);

            onError.ExecuteTargetsAttribute = "et2";

            Assert.AreEqual("et2", onError.ExecuteTargetsAttribute);
            Assert.AreEqual(true, project.HasUnsavedChanges);
        }
Пример #3
0
 /// <inheritdoc />
 protected override ProjectElement CreateNewInstance(ProjectRootElement owner)
 {
     return(owner.CreateOnErrorElement(ExecuteTargetsAttribute));
 }