Exemplo n.º 1
0
		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);
		}
Exemplo n.º 2
0
        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);
        }