public void FixtureSetUp () { InMemoryPreferencesClient memPrefsClient = new InMemoryPreferencesClient (); Type prefsType = typeof (Preferences); FieldInfo prefsClientField = prefsType.GetField ("client", BindingFlags.NonPublic | BindingFlags.Static); prefsClientField.SetValue (null, memPrefsClient); Type servicesType = typeof (Services); FieldInfo servicesClientField = servicesType.GetField ("prefs", BindingFlags.NonPublic | BindingFlags.Static); servicesClientField.SetValue (null, memPrefsClient); }
public void FixtureSetUp() { InMemoryPreferencesClient memPrefsClient = new InMemoryPreferencesClient(); Type prefsType = typeof(Preferences); FieldInfo prefsClientField = prefsType.GetField("client", BindingFlags.NonPublic | BindingFlags.Static); prefsClientField.SetValue(null, memPrefsClient); Type servicesType = typeof(Services); FieldInfo servicesClientField = servicesType.GetField("prefs", BindingFlags.NonPublic | BindingFlags.Static); servicesClientField.SetValue(null, memPrefsClient); }