public void BuildBaseProject_WithNullBackupFileName_ThrowsArgumentException() { IDirectoryInfo projectBackupDir = MockRepository.GenerateStub<IDirectoryInfo>(); projectBackupDir.Stub(dir => dir.Exists).Return(true); RegisteredProjectInfo projectInfo = new RegisteredProjectInfo(null, null, new Version()); ProjectInstallInfo installInfo = new ProjectInstallInfo(projectInfo, null, null); _projectUpgradeService.BuildBaseProject(installInfo, projectBackupDir, null); }
public void BuildBaseProject_WithNonExistentBackupFile_ThrowsArgumentException() { IDirectoryInfo projectBackupDir = MockRepository.GenerateStub<IDirectoryInfo>(); projectBackupDir.Stub(dir => dir.Exists).Return(true); projectBackupDir.Stub(dir => dir.Exists).Return(true); projectBackupDir.Stub(dir => dir.GetFiles("")).IgnoreArguments().Return(new IFileInfo[] {}); projectBackupDir.Stub(dir => dir.FullName).Return("C:\\"); RegisteredProjectInfo projectInfo = new RegisteredProjectInfo(null, "dummy.zip", new Version()); ProjectInstallInfo installInfo = new ProjectInstallInfo(projectInfo, null, null); _projectUpgradeService.BuildBaseProject(installInfo, projectBackupDir, null); }