public void AddExistingProjectPath() { var projectPaths = Repository.Object.Data.ProjectToPathMap; Assert.That(projectPaths.Count, Is.EqualTo(1)); ProjectPathsManager.Add("projectKey", "newProjectPath"); Assert.That(projectPaths.Count, Is.EqualTo(1)); Assert.That(projectPaths.ContainsKey("projectKey"), Is.True); Assert.That(projectPaths["projectKey"], Is.EqualTo("newProjectPath")); Repository.Verify(Repository => Repository.Save(), Times.Once()); }
public void AddInvalidProjectPath() { var projectPaths = Repository.Object.Data.ProjectToPathMap; Assert.That(projectPaths.Count, Is.EqualTo(1)); ProjectPathsManager.Add("newProjectKey", null); Assert.That(projectPaths.Count, Is.EqualTo(1)); Repository.Verify(Repository => Repository.Save(), Times.Never()); ProjectPathsManager.Add(null, "newProjectPath"); Assert.That(projectPaths.Count, Is.EqualTo(1)); Repository.Verify(Repository => Repository.Save(), Times.Never()); }