public void WhenSetValidZoneSettings_GetZoneSettingsReturnSameValues()
        {
            var baseKey    = hkcu.CreateSubKey(TestKeyPath);
            var repository = new ConnectionSettingsRepository(baseKey);

            repository.SetProjectSettings(new ProjectConnectionSettings()
            {
                ProjectId = "pro-1"
            });
            repository.SetZoneSettings("pro-1", new ZoneConnectionSettings()
            {
                ZoneId   = "zone-1",
                Username = "******"
            });

            Assert.AreEqual("user-1", repository.GetZoneSettings("pro-1", "zone-1").Username);
        }
        public void WhenProjectSettingsDeleted_ZoneSettingsAreDeletedToo()
        {
            var baseKey    = hkcu.CreateSubKey(TestKeyPath);
            var repository = new ConnectionSettingsRepository(baseKey);

            repository.SetProjectSettings(new ProjectConnectionSettings()
            {
                ProjectId = "pro-1"
            });
            repository.SetZoneSettings("pro-1", new ZoneConnectionSettings()
            {
                ZoneId   = "zone-1",
                Username = "******"
            });
            repository.DeleteProjectSettings("pro-1");

            Assert.Throws <KeyNotFoundException>(() =>
            {
                repository.GetZoneSettings("pro-1", "zone-1");
            });
        }