예제 #1
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetUsingTaskCondition_SetInXml()
        {
            Project p = new Project();

            p.LoadXml(TestData.ContentUsingTaskName);
            Assertion.AssertEquals("true", CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).Condition);
        }
예제 #2
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetConditionExpression()
        {
            Project p = new Project();

            p.LoadXml(TestData.ContentUsingTaskFile);
            Assertion.AssertEquals("$(value)==true", CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).Condition);
        }
예제 #3
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetAssemblyNameScalarThatIsNotSet()
        {
            Project p = new Project(new Engine());

            p.AddNewUsingTaskFromAssemblyName("TaskName", @"$(assemblyName)");
            object o = p.EvaluatedItems;

            Assertion.AssertEquals(@"$(assemblyName)", CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).AssemblyName);
        }
예제 #4
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetAssemblyNameSpecialChars()
        {
            Project p = new Project();

            p.AddNewUsingTaskFromAssemblyName("TaskName", @"%*?@$();\");
            object o = p.EvaluatedItems;

            Assertion.AssertEquals(@"%*?@$();\", CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).AssemblyName);
        }
예제 #5
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetAssemblyNameSpecialCharsEscaped()
        {
            Project p = new Project(new Engine());

            p.AddNewUsingTaskFromAssemblyName("TaskName", @"%25%2a%3f%40%24%28%29%3b\");
            object o = p.EvaluatedItems;

            Assertion.AssertEquals(@"%25%2a%3f%40%24%28%29%3b\", CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).AssemblyName);
        }
예제 #6
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetConditionSimple()
        {
            Project p = new Project();

            p.LoadXml(TestData.ContentUsingTaskName);
            object o = p.EvaluatedProperties;

            Assertion.AssertEquals("true", CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).Condition);
        }
예제 #7
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetTaskNameSpeicalCharsEscaped()
        {
            Project p = new Project(new Engine());

            p.AddNewUsingTaskFromAssemblyName(@"%25%2a%3f%40%24%28%29%3b\", "assemblyName");
            object o = p.EvaluatedItems;

            Assertion.AssertNotNull(CompatibilityTestHelpers.FindUsingTaskByName(@"%25%2a%3f%40%24%28%29%3b\", p.UsingTasks));
        }
예제 #8
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void IsImported_false()
        {
            Project p = new Project(new Engine());

            p.LoadXml(TestData.ContentUsingTaskFile);
            object o = p.EvaluatedProperties;

            Assertion.AssertEquals(false, CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).IsImported);
        }
예제 #9
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetTaskNameSpeicalChars()
        {
            Project p = new Project();

            p.AddNewUsingTaskFromAssemblyName(@"%*?@$();\", "assemblyName");
            object o = p.EvaluatedItems;

            Assertion.AssertNotNull(CompatibilityTestHelpers.FindUsingTaskByName(@"%*?@$();\", p.UsingTasks));
        }
예제 #10
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetTaskName_SetInXml()
        {
            Project p = new Project();

            p.LoadXml(TestData.ContentUsingTaskFile);
            object o = p.EvaluatedItems;

            Assertion.AssertNotNull(CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks));
        }
예제 #11
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetUsingTaskAssemblyFile_SetInXml()
        {
            Project p = new Project(new Engine());

            p.LoadXml(TestData.ContentUsingTaskFile);
            object o = p.EvaluatedItems;

            Assertion.AssertEquals("AssemblyName.dll", CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).AssemblyFile);
        }
예제 #12
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        /// <summary>
        /// Set an assembly file name, then retrieve it.
        /// </summary>
        private string SetandGetAssemblyFileName(string assemblyFileName)
        {
            Project p = new Project();

            p.AddNewUsingTaskFromAssemblyFile("TaskName", assemblyFileName);
            object    o         = p.EvaluatedItems;
            UsingTask usingTask = CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks);

            return(usingTask.AssemblyFile);
        }
예제 #13
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetTaskNameScalar()
        {
            Project p = new Project(new Engine());

            p.AddNewUsingTaskFromAssemblyName("$(name)", "assemblyName");
            p.SetProperty("name", "TaskName");
            object o = p.EvaluatedItems;

            Assertion.AssertNotNull(CompatibilityTestHelpers.FindUsingTaskByName("$(name)", p.UsingTasks));
        }
예제 #14
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void GetAssemblyNameScalarEvaluation()
        {
            string  assemblyName = "$(assemblyName)";
            Project p            = new Project();

            p.SetProperty("assemblyName", "aName");
            object o = p.EvaluatedItems;

            p.AddNewUsingTaskFromAssemblyName("TaskName", assemblyName);
            o = p.EvaluatedItems;
            Assertion.AssertEquals(assemblyName, CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).AssemblyName);
        }
예제 #15
0
파일: UsingTask_Tests.cs 프로젝트: 3F/IeXod
        public void IsImported_true()
        {
            string importPath = String.Empty;

            try
            {
                importPath = ObjectModelHelpers.CreateFileInTempProjectDirectory("import.proj", TestData.ContentUsingTaskName);
                Project p = new Project(new Engine());
                p.AddNewImport(importPath, "true");
                Object o      = p.EvaluatedProperties;
                Import import = CompatibilityTestHelpers.FindFirstMatchingImportByPath(p.Imports, importPath);
                import.Condition = null;
                Assertion.AssertEquals(true, CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p.UsingTasks).IsImported);
            }
            finally
            {
                CompatibilityTestHelpers.RemoveFile(importPath);
            }
        }
예제 #16
0
        public void ImportsUsingTask()
        {
            string importPath = String.Empty;

            try
            {
                importPath = ObjectModelHelpers.CreateFileInTempProjectDirectory("import.proj", TestData.Content3SimpleTargetsDefaultSpecified);
                Project p = new Project();
                p.Save(importPath);                                                                            // required to reproduce
                importPath = ObjectModelHelpers.CreateFileInTempProjectDirectory("import.proj", TestData.ContentUsingTaskFile);
                Project p2 = new Project();                                                                    // new Engine() here fixes testcase
                p2.AddNewImport(importPath, "true");
                object o = p2.EvaluatedProperties;                                                             // evaluate the import
                Assertion.AssertNull(CompatibilityTestHelpers.FindUsingTaskByName("TaskName", p2.UsingTasks)); // fails to find task
            }
            finally
            {
                CompatibilityTestHelpers.RemoveFile(importPath);
            }
        }