Community
Participate
Working Groups
return section;
}
/* (non-Javadoc)
* Method declared on IDialogSettings.
*/
public void addSection(IDialogSettings section) {
sections.put(section.getName(), section);
/**
* Remove a section in the receiver. If the given section does not exist, nothing is done.
*
* @param section
* the section to be removed
public void removeSection(IDialogSettings section) {
sections.remove(section.getName());
public String get(String key) {
return null;
});
public void testRemoveSection() {
DialogSettings dialogSettings = new DialogSettings(null);
IDialogSettings section = dialogSettings.addNewSection("new-section");
dialogSettings.removeSection(section);
assertEquals(0, dialogSettings.getSections().length);
public void testRemoveNonExistingSection() {
IDialogSettings otherSection = new DialogSettings(null);
dialogSettings.removeSection(otherSection);
public void testRemoveSectionWithNullArgument() {
try {
dialogSettings.removeSection(null);
} catch (NullPointerException expected) {
public void testKeys() throws IOException {
for (int i = 0; i < TEST_STRINGS.length; i++) {
-