public void WhenBaseKeyDoesNotExist_ListProjectSettingsReturnsEmptyList() { var baseKey = hkcu.CreateSubKey(TestKeyPath); var repository = new ConnectionSettingsRepository(baseKey); var projects = repository.ListProjectSettings(); Assert.IsFalse(projects.Any()); }
public void WhenProjectSettingsSaved_ProjectReturnedInListProjects() { var baseKey = hkcu.CreateSubKey(TestKeyPath); var repository = new ConnectionSettingsRepository(baseKey); var originalSettings = new ProjectConnectionSettings() { ProjectId = "pro-1", Username = "******" }; repository.SetProjectSettings(originalSettings); var projects = repository.ListProjectSettings(); Assert.AreEqual(1, projects.Count()); }