public void WhenBaseKeyIsEmpty_SettingsAreEmpty() { var baseKey = hkcu.CreateSubKey(TestKeyPath); var repository = new InventorySettingsRepository(baseKey); var settings = repository.GetSettings(); Assert.IsNull(settings.Username); Assert.IsNull(settings.Password); Assert.IsNull(settings.Domain); }
public void WhenSettingsSaved_GetSettingsReturnsData() { var baseKey = hkcu.CreateSubKey(TestKeyPath); var repository = new InventorySettingsRepository(baseKey); var originalSettings = new InventorySettings() { Username = "******" }; repository.SetSettings(originalSettings); var settings = repository.GetSettings(); Assert.AreEqual(originalSettings.Username, settings.Username); }