Example #1
0
        public void ShouldCopyToOutputDirectory(string copyToOutputDirectoryValue, bool expectedResult)
        {
            ProjectRootElement projectRootElement = ProjectRootElement.Create();
            ProjectItemElement item = projectRootElement.AddItem("Foo", "Foo.xml");

            if (!string.IsNullOrEmpty(copyToOutputDirectoryValue))
            {
                item.AddMetadata("CopyToOutputDirectory", copyToOutputDirectoryValue);
            }

            ProjectInstance     projectInstance = TestHelpers.CreateProjectInstanceFromRootElement(projectRootElement);
            ProjectItemInstance itemInstance    = projectInstance.GetItems("Foo").Single();

            Assert.Equal(expectedResult, itemInstance.ShouldCopyToOutputDirectory());
        }