Пример #1
0
        public override bool Equals(object obj)
        {
            FileNameAndProjectName rhs = obj as FileNameAndProjectName;

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

			AddFile (@"src\files\abc.cs");

			var expectedFileNameAndProjectName = new FileNameAndProjectName {
				FileName = @"src\files\abc.cs".ToNativePath (),
				ProjectName = "MyTestProject"
			};

			Assert.AreEqual (expectedFileNameAndProjectName, projectSystem.FileNameAndProjectNamePassedToLogAddedFileToProject);
		}
		protected override void LogAddedFileToProject (string fileName, string projectName)
		{
			FileNameAndProjectNamePassedToLogAddedFileToProject =
				new FileNameAndProjectName (fileName, projectName);
		}