test_class.file: app-cleaner/src/test/java/com/kdgregory/pomutil/cleaner/transform/TestInsertCommonProperties.java
test_class.identifier: TestInsertCommonProperties
test_class.superclass: extends AbstractTransformerTest
test_case.body: @Test
      public void testDisabled() throws Exception
      {
          CommandLine args = new CommandLine("--noCommonProps");
          new InsertCommonProperties(loadPom("cleaner/CommonProps1.xml"), args).transform();
  
          assertEquals("number of properties", 0,
                       newXPath("/mvn:project/mvn:properties/*").evaluate(dom(), Element.class).size());
      }
test_case.class_method_signature: TestInsertCommonProperties.testDisabled()
test_case.full_signature: @Test public void testDisabled()
test_case.identifier: testDisabled
test_case.invocations: transform loadPom assertEquals size evaluate newXPath dom
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDisabled()
focal_class.declarator: logger = LoggerFactory.getLogger(getClass())
focal_class.original_string: Logger logger = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: COMMON_PROPS = new MapBuilder<String,String>(new TreeMap<String,String>())
                                                       .put("project.build.sourceEncoding",       "UTF-8")
                                                       .put("project.reporting.outputEncoding",   "UTF-8")
                                                       .toMap()
focal_class.modifier: private static
focal_class.original_string: private static Map<String,String> COMMON_PROPS = new MapBuilder<String,String>(new TreeMap<String,String>())
                                                       .put("project.build.sourceEncoding",       "UTF-8")
                                                       .put("project.reporting.outputEncoding",   "UTF-8")
                                                       .toMap();
focal_class.type: Map<String,String>
focal_class.var_name: COMMON_PROPS
focal_class.declarator: disabled
focal_class.modifier: private
focal_class.original_string: private boolean disabled;
focal_class.type: boolean
focal_class.var_name: disabled
focal_class.file: app-cleaner/src/main/java/com/kdgregory/pomutil/cleaner/transform/InsertCommonProperties.java
focal_class.identifier: InsertCommonProperties
focal_class.class_method_signature: InsertCommonProperties.InsertCommonProperties(PomWrapper pom, CommandLine options)
focal_class.full_signature: public  InsertCommonProperties(PomWrapper pom, CommandLine options)
focal_class.identifier: InsertCommonProperties
focal_class.modifiers: public
focal_class.parameters: (PomWrapper pom, CommandLine options)
focal_class.signature:  InsertCommonProperties(PomWrapper pom, CommandLine options)
focal_class.class_method_signature: InsertCommonProperties.InsertCommonProperties(PomWrapper pom)
focal_class.full_signature: public  InsertCommonProperties(PomWrapper pom)
focal_class.identifier: InsertCommonProperties
focal_class.modifiers: public
focal_class.parameters: (PomWrapper pom)
focal_class.signature:  InsertCommonProperties(PomWrapper pom)
focal_class.class_method_signature: InsertCommonProperties.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.superclass: extends AbstractTransformer
focal_method.body: @Override
      public void transform()
      {
          if (disabled)
              return;
  
          for (Map.Entry<String,String> prop : COMMON_PROPS.entrySet())
          {
              if (StringUtil.isBlank(pom.getProperty(prop.getKey())))
              {
                  logger.info("adding property: " + prop.getKey());
                  pom.setProperty(prop.getKey(), prop.getValue());
              }
          }
      }
focal_method.class_method_signature: InsertCommonProperties.transform()
focal_method.full_signature: @Override public void transform()
focal_method.identifier: transform
focal_method.invocations: entrySet isBlank getProperty getKey info getKey setProperty getKey getValue
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void transform()