@Test public void createWithValidParams() throws Exception { final ClassNamingScheme create = factory.create(namingScheme, pattern); given(mockCounter.next()).willReturn(nextCount); final String actual = create.generate("feature1.feature"); assertThat(actual).isEqualTo(expectedResult); }
public ClassNamingScheme create(final String namingScheme, final String namingPattern) throws MojoExecutionException { if (namingScheme.equals("simple")) { return new PatternNamingScheme("Parallel{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("feature-title")) { return new PatternNamingScheme("{f}{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("pattern")) { if (namingPattern == null) { throw new MojoExecutionException("namingPattern tag is required"); } return new PatternNamingScheme(namingPattern, counter, featureFileNamingScheme); } else { throw new MojoExecutionException( "Error in configuration ; accepted value for tag " + "'namingScheme' are 'simple' or 'feature-title' or 'pattern'"); } }
ClassNamingSchemeFactory { public ClassNamingScheme create(final String namingScheme, final String namingPattern) throws MojoExecutionException { if (namingScheme.equals("simple")) { return new PatternNamingScheme("Parallel{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("feature-title")) { return new PatternNamingScheme("{f}{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("pattern")) { if (namingPattern == null) { throw new MojoExecutionException("namingPattern tag is required"); } return new PatternNamingScheme(namingPattern, counter, featureFileNamingScheme); } else { throw new MojoExecutionException( "Error in configuration ; accepted value for tag " + "'namingScheme' are 'simple' or 'feature-title' or 'pattern'"); } } }
ClassNamingSchemeFactory { public ClassNamingScheme create(final String namingScheme, final String namingPattern) throws MojoExecutionException { if (namingScheme.equals("simple")) { return new PatternNamingScheme("Parallel{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("feature-title")) { return new PatternNamingScheme("{f}{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("pattern")) { if (namingPattern == null) { throw new MojoExecutionException("namingPattern tag is required"); } return new PatternNamingScheme(namingPattern, counter, featureFileNamingScheme); } else { throw new MojoExecutionException( "Error in configuration ; accepted value for tag " + "'namingScheme' are 'simple' or 'feature-title' or 'pattern'"); } } ClassNamingSchemeFactory(final Counter counter); }
ClassNamingSchemeFactory { public ClassNamingScheme create(final String namingScheme, final String namingPattern) throws MojoExecutionException { if (namingScheme.equals("simple")) { return new PatternNamingScheme("Parallel{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("feature-title")) { return new PatternNamingScheme("{f}{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("pattern")) { if (namingPattern == null) { throw new MojoExecutionException("namingPattern tag is required"); } return new PatternNamingScheme(namingPattern, counter, featureFileNamingScheme); } else { throw new MojoExecutionException( "Error in configuration ; accepted value for tag " + "'namingScheme' are 'simple' or 'feature-title' or 'pattern'"); } } ClassNamingSchemeFactory(final Counter counter); ClassNamingScheme create(final String namingScheme,
			final String namingPattern); }
ClassNamingSchemeFactory { public ClassNamingScheme create(final String namingScheme, final String namingPattern) throws MojoExecutionException { if (namingScheme.equals("simple")) { return new PatternNamingScheme("Parallel{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("feature-title")) { return new PatternNamingScheme("{f}{c}IT", counter, featureFileNamingScheme); } else if (namingScheme.equals("pattern")) { if (namingPattern == null) { throw new MojoExecutionException("namingPattern tag is required"); } return new PatternNamingScheme(namingPattern, counter, featureFileNamingScheme); } else { throw new MojoExecutionException( "Error in configuration ; accepted value for tag " + "'namingScheme' are 'simple' or 'feature-title' or 'pattern'"); } } ClassNamingSchemeFactory(final Counter counter); ClassNamingScheme create(final String namingScheme,
			final String namingPattern);  }