public void InConeButAbsolute()
        {
            AssignTargetPath t = new AssignTargetPath();
            t.BuildEngine = new MockEngine();
            t.Files = new ITaskItem[] { new TaskItem(@"c:\f1\f2\f3\f4\file.txt") };
            t.RootFolder = @"c:\f1\f2";

            bool success = t.Execute();

            Assert.IsTrue(success);

            Assert.AreEqual(1, t.AssignedFiles.Length);
            Assert.AreEqual(@"f3\f4\file.txt", t.AssignedFiles[0].GetMetadata("TargetPath"));
        }
        public void Regress314791()
        {
            AssignTargetPath t = new AssignTargetPath();
            t.BuildEngine = new MockEngine();
            t.Files = new ITaskItem[] { new TaskItem(@"c:\bin2\abc.efg") };
            t.RootFolder = @"c:\bin";

            bool success = t.Execute();

            Assert.IsTrue(success);

            Assert.AreEqual(1, t.AssignedFiles.Length);
            Assert.AreEqual(@"c:\bin2\abc.efg", t.AssignedFiles[0].ItemSpec);
            Assert.AreEqual(@"abc.efg", t.AssignedFiles[0].GetMetadata("TargetPath"));
        }