예제 #1
0
 @Test
 public void setDefaultPreferenceTest() {
   WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
   MavenSettingsPreferencePage page = new MavenSettingsPreferencePage();
   dialog.open();
   dialog.select(page);
   String location = page.getUserSettingsLocation();
   page.setUserSettingsLocation(location.replaceFirst(".xml", "_new.xml"));
   dialog.ok();
   new WaitWhile(new JobIsRunning(), TimePeriod.NORMAL);
   Preferences.setDefault(M2E_PLUGIN, M2E_USER_SETTINGS);
   dialog.open();
   dialog.select(page);
   String newLocation = page.getUserSettingsLocation();
   dialog.ok();
   assertEquals(newLocation, location);
 }
예제 #2
0
 @Before
 @After
 public void restoreToDefault() {
   Preferences.setDefault(M2E_PLUGIN, M2E_USER_SETTINGS);
 }