test_class.file: app-cleaner/src/test/java/com/kdgregory/pomutil/cleaner/transform/TestOrganizePom.java
test_class.identifier: TestOrganizePom
test_class.superclass: extends AbstractTransformerTest
test_case.body: @Test
      public void testDisabledByDefault() throws Exception
      {
          loadPom("cleaner/OrganizePom1.xml");
          Element root = dom().getDocumentElement();
  
          CommandLine args = new CommandLine();
          new OrganizePom(pom, args).transform();
  
          List<Element> children = DomUtil.getChildren(root);
          assertEquals("number of children", 9, children.size());
  
          // checking first and last child should be sufficient
          assertEquals("first child name", "description",         children.get(0).getLocalName());
          assertEquals("last child name", "modelVersion",         children.get(8).getLocalName());
      }
test_case.class_method_signature: TestOrganizePom.testDisabledByDefault()
test_case.full_signature: @Test public void testDisabledByDefault()
test_case.identifier: testDisabledByDefault
test_case.invocations: loadPom getDocumentElement dom transform getChildren assertEquals size assertEquals getLocalName get assertEquals getLocalName get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDisabledByDefault()
focal_class.declarator: enabled
focal_class.modifier: private
focal_class.original_string: private boolean enabled;
focal_class.type: boolean
focal_class.var_name: enabled
focal_class.file: app-cleaner/src/main/java/com/kdgregory/pomutil/cleaner/transform/OrganizePom.java
focal_class.identifier: OrganizePom
focal_class.class_method_signature: OrganizePom.OrganizePom(PomWrapper pom, CommandLine args)
focal_class.full_signature: public  OrganizePom(PomWrapper pom, CommandLine args)
focal_class.identifier: OrganizePom
focal_class.modifiers: public
focal_class.parameters: (PomWrapper pom, CommandLine args)
focal_class.signature:  OrganizePom(PomWrapper pom, CommandLine args)
focal_class.class_method_signature: OrganizePom.transform()
focal_class.full_signature: @Override public void transform()
focal_class.identifier: transform
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void transform()
focal_class.class_method_signature: OrganizePom.loadPrototype()
focal_class.full_signature: private String[] loadPrototype()
focal_class.identifier: loadPrototype
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] loadPrototype()
focal_class.class_method_signature: OrganizePom.selectElements(Element root)
focal_class.full_signature: private Map<String,Element> selectElements(Element root)
focal_class.identifier: selectElements
focal_class.modifiers: private
focal_class.parameters: (Element root)
focal_class.return: Map<String,Element>
focal_class.signature: Map<String,Element> selectElements(Element root)
focal_class.superclass: extends AbstractTransformer
focal_method.body: @Override
      public void transform()
      {
          if (!enabled)
              return;
  
          String[] expectedElements = loadPrototype();
  
          Element root = pom.getDom().getDocumentElement();
          Map<String,Element> children = selectElements(root);
          Utils.reconstruct(root, children, expectedElements);
      }
focal_method.class_method_signature: OrganizePom.transform()
focal_method.full_signature: @Override public void transform()
focal_method.identifier: transform
focal_method.invocations: loadPrototype getDocumentElement getDom selectElements reconstruct
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void transform()