public void AddFile_NewResxFile_AddsFileToProjectWithCorrectItemType()
        {
            CreateTestProject(@"d:\projects\MyProject\MyProject.csproj");
            project.ItemTypeToReturnFromGetDefaultItemType = ItemType.EmbeddedResource;
            CreateProjectSystem(project);

            string fileName = @"d:\projects\MyProject\src\NewFile.resx";

            projectSystem.AddFile(fileName, null);
            FileProjectItem fileItem = ProjectHelper.GetFile(project, fileName);

            FileProjectItem expectedFileItem = new FileProjectItem(project, ItemType.EmbeddedResource);

            expectedFileItem.FileName = fileName;

            FileProjectItemAssert.AreEqual(expectedFileItem, fileItem);
        }
        public void AddFile_NewFile_AddsFileToProject()
        {
            CreateTestProject(@"d:\projects\MyProject\MyProject.csproj");
            project.ItemTypeToReturnFromGetDefaultItemType = ItemType.Compile;
            CreateProjectSystem(project);

            string fileName = @"d:\projects\MyProject\src\NewFile.cs";

            AddFile(fileName);
            FileProjectItem fileItem = ProjectHelper.GetFile(project, fileName);

            FileProjectItem expectedFileItem = new FileProjectItem(project, ItemType.Compile);

            expectedFileItem.FileName = FileName.Create(fileName);

            FileProjectItemAssert.AreEqual(expectedFileItem, fileItem);
        }
        public void AddFile_RelativeFileNameWithNoPathUsed_AddsFileToProject()
        {
            CreateTestProject(@"d:\projects\MyProject\MyProject.csproj");
            project.ItemTypeToReturnFromGetDefaultItemType = ItemType.Compile;
            CreateProjectSystem(project);

            string relativeFileName = @"NewFile.cs";
            string fileName         = @"d:\projects\MyProject\NewFile.cs";

            projectSystem.AddFile(relativeFileName, null);
            FileProjectItem fileItem = ProjectHelper.GetFile(project, fileName);

            FileProjectItem expectedFileItem = new FileProjectItem(project, ItemType.Compile);

            expectedFileItem.FileName = fileName;

            FileProjectItemAssert.AreEqual(expectedFileItem, fileItem);
        }