public void WFSS_SetString() { var hk = mr.StrictMock <IRegistryKey>(); hkcu.Expect(h => h.OpenSubKey(@"Software\jklSoft\Reko", true)).Return(hk); hk.Expect(h => h.SetValue("foo", "bar")); mr.ReplayAll(); settingsSvc.Set("foo", "bar"); mr.VerifyAll(); }