public override bool Equals(object obj)
        {
            FileNameAndProjectName rhs = obj as FileNameAndProjectName;

            if (rhs != null)
            {
                return((rhs.FileName == FileName) &&
                       (rhs.ProjectName == ProjectName));
            }
            return(false);
        }
		public void AddFile_NewFileAlreadyExistsInProject_FileIsStillLogged()
		{
			CreateTestProject(@"d:\temp\MyProject.csproj");
			project.Name = "MyTestProject";
			AddFileToProject(@"src\files\abc.cs");
			CreateProjectSystem(project);
			
			projectSystem.AddFile(@"src\files\abc.cs", null);
			
			var expectedFileNameAndProjectName = new FileNameAndProjectName {
				FileName = @"src\files\abc.cs",
				ProjectName = "MyTestProject"
			};
			
			Assert.AreEqual(expectedFileNameAndProjectName, projectSystem.FileNameAndProjectNamePassedToLogAddedFileToProject);
		}
Пример #3
0
 protected override void LogAddedFileToProject(string fileName, string projectName)
 {
     FileNameAndProjectNamePassedToLogAddedFileToProject =
         new FileNameAndProjectName(fileName, projectName);
 }
		protected override void LogAddedFileToProject(string fileName, string projectName)
		{
			FileNameAndProjectNamePassedToLogAddedFileToProject =
				new FileNameAndProjectName(fileName, projectName);
		}