@Test public void testOptionCount() { SubOptions subOptions = SubOptions.getSubOptions( this.subOptionName ); Assert.assertTrue( this.expectedClass.isAssignableFrom( subOptions.getClass() ) ); }
public static SubOptions getSubOptions( final String name ) { if ( name == null ) { return new EmptyOptions(); } else if ( "console".equalsIgnoreCase( name ) ) { return new ConsoleOptions(); } else if ( "viewpage".equalsIgnoreCase( name ) ) { return new ViewpageOptions(); } else if ( "server".equalsIgnoreCase( name ) ) { return new ServerOptions(); } else if ( "help".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else if ( "version".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else { return new EmptyOptions(); } }
SubOptions { public static SubOptions getSubOptions( final String name ) { if ( name == null ) { return new EmptyOptions(); } else if ( "console".equalsIgnoreCase( name ) ) { return new ConsoleOptions(); } else if ( "viewpage".equalsIgnoreCase( name ) ) { return new ViewpageOptions(); } else if ( "server".equalsIgnoreCase( name ) ) { return new ServerOptions(); } else if ( "help".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else if ( "version".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else { return new EmptyOptions(); } } }
SubOptions { public static SubOptions getSubOptions( final String name ) { if ( name == null ) { return new EmptyOptions(); } else if ( "console".equalsIgnoreCase( name ) ) { return new ConsoleOptions(); } else if ( "viewpage".equalsIgnoreCase( name ) ) { return new ViewpageOptions(); } else if ( "server".equalsIgnoreCase( name ) ) { return new ServerOptions(); } else if ( "help".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else if ( "version".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else { return new EmptyOptions(); } }  }
SubOptions { public static SubOptions getSubOptions( final String name ) { if ( name == null ) { return new EmptyOptions(); } else if ( "console".equalsIgnoreCase( name ) ) { return new ConsoleOptions(); } else if ( "viewpage".equalsIgnoreCase( name ) ) { return new ViewpageOptions(); } else if ( "server".equalsIgnoreCase( name ) ) { return new ServerOptions(); } else if ( "help".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else if ( "version".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else { return new EmptyOptions(); } }  abstract Options getOptions(); static SubOptions getSubOptions( final String name ); }
SubOptions { public static SubOptions getSubOptions( final String name ) { if ( name == null ) { return new EmptyOptions(); } else if ( "console".equalsIgnoreCase( name ) ) { return new ConsoleOptions(); } else if ( "viewpage".equalsIgnoreCase( name ) ) { return new ViewpageOptions(); } else if ( "server".equalsIgnoreCase( name ) ) { return new ServerOptions(); } else if ( "help".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else if ( "version".equalsIgnoreCase( name ) ) { return new EmptyOptions(); } else { return new EmptyOptions(); } }  abstract Options getOptions(); static SubOptions getSubOptions( final String name );  }