@Test public void generatesJavaFile() throws Exception { MatcherAssert.assertThat( new Type( "Car", new StickyList<>( new Method( "drive", new StickyList<>( new Parameter("x", "Integer"), new Parameter("y", "Long") ), "Int" ) ) ).java().code(), new InputHasContent( Matchers.stringContainsInOrder( new StickyList<>( "public interface Car", "{", "Int drive(final Integer x, final Long y);", "}" ) ) ) ); }
@Override public JavaFile java() { return new JavaInterface(this.name, this.methods); }
Type implements RootNode { @Override public JavaFile java() { return new JavaInterface(this.name, this.methods); } }
Type implements RootNode { @Override public JavaFile java() { return new JavaInterface(this.name, this.methods); } Type(final String label, final Collection<Method> mts); }
Type implements RootNode { @Override public JavaFile java() { return new JavaInterface(this.name, this.methods); } Type(final String label, final Collection<Method> mts); @Override JavaFile java(); @Override Iterable<Directive> xml(); }
Type implements RootNode { @Override public JavaFile java() { return new JavaInterface(this.name, this.methods); } Type(final String label, final Collection<Method> mts); @Override JavaFile java(); @Override Iterable<Directive> xml();  }