예제 #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);
		}
예제 #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);
        }