@Test public void tag() throws Exception { new Expectations() {{ project.getArtifactId(); result = "docker-maven-plugin"; project.getGroupId(); result = "io.fabric8"; project.getVersion(); result = "1.2.3-SNAPSHOT"; project.getProperties(); result = new Properties(); }}; assertThat(formatter.format("%g/%a:%l"), equalTo("fabric8/docker-maven-plugin:latest")); assertThat(formatter.format("%g/%a:%v"), equalTo("fabric8/docker-maven-plugin:1.2.3-SNAPSHOT")); assertThat(formatter.format("%g/%a:%t").matches(".*snapshot-[\\d-]+$"), is(true)); }
@Override public String format(String name) { if (name == null) { return null; } return formatParamReplacer.replace(name); }
ImageNameFormatter implements ConfigHelper.NameFormatter { @Override public String format(String name) { if (name == null) { return null; } return formatParamReplacer.replace(name); } }
ImageNameFormatter implements ConfigHelper.NameFormatter { @Override public String format(String name) { if (name == null) { return null; } return formatParamReplacer.replace(name); } ImageNameFormatter(MavenProject project, Date now); }
ImageNameFormatter implements ConfigHelper.NameFormatter { @Override public String format(String name) { if (name == null) { return null; } return formatParamReplacer.replace(name); } ImageNameFormatter(MavenProject project, Date now); @Override String format(String name); }
ImageNameFormatter implements ConfigHelper.NameFormatter { @Override public String format(String name) { if (name == null) { return null; } return formatParamReplacer.replace(name); } ImageNameFormatter(MavenProject project, Date now); @Override String format(String name);  }