use of com.intellij.psi.codeStyle.arrangement.model.ArrangementAtomMatchCondition in project intellij-community by JetBrains.
the class ArrangementSettingsSerializationTest method testEmptyRules.
@Test
public void testEmptyRules() throws Exception {
final StdArrangementSettings settings = new StdArrangementSettings();
settings.addGrouping(new ArrangementGroupingRule(OVERRIDDEN_METHODS, BY_NAME));
final StdArrangementSettings defaultSettings = new StdArrangementSettings();
final ArrangementAtomMatchCondition condition = new ArrangementAtomMatchCondition(FIELD);
final StdArrangementMatchRule rule = new StdArrangementMatchRule(new StdArrangementEntryMatcher(condition), BY_NAME);
defaultSettings.addRule(rule);
final Element holder = doSerializationTest(settings, defaultSettings);
assertTrue(holder.getChildren().size() == 2);
final Element rules = holder.getChild("rules");
assertNotNull(rules);
assertTrue(rules.getChildren().isEmpty());
}
Aggregations