@Test public void generatesJavaFiles() throws Exception { MatcherAssert.assertThat( new Tree( new StickyList<>( new Type( "Car", new StickyList<>( new Method( "drive", new StickyList<>( new Parameter("x", "Integer"), new Parameter("y", "Long") ), "Int" ) ) ) ) ).java(), Matchers.hasEntry( Matchers.equalTo("Car.java"), new InputHasContent( Matchers.stringContainsInOrder( new StickyList<>( "public interface Car {", "Int drive(final Integer x, final Long y);", "}" ) ) ) ) ); }
public Map<String, Input> java() { return new StickyMap<>( new Mapped<>( javaFile -> new MapEntry<>( javaFile.path(), javaFile.code() ), new Mapped<>(RootNode::java, this.nodes) ) ); }
Tree { public Map<String, Input> java() { return new StickyMap<>( new Mapped<>( javaFile -> new MapEntry<>( javaFile.path(), javaFile.code() ), new Mapped<>(RootNode::java, this.nodes) ) ); } }
Tree { public Map<String, Input> java() { return new StickyMap<>( new Mapped<>( javaFile -> new MapEntry<>( javaFile.path(), javaFile.code() ), new Mapped<>(RootNode::java, this.nodes) ) ); } Tree(final Collection<RootNode> list); }
Tree { public Map<String, Input> java() { return new StickyMap<>( new Mapped<>( javaFile -> new MapEntry<>( javaFile.path(), javaFile.code() ), new Mapped<>(RootNode::java, this.nodes) ) ); } Tree(final Collection<RootNode> list); Map<String, Input> java(); Iterable<Directive> xml(); }
Tree { public Map<String, Input> java() { return new StickyMap<>( new Mapped<>( javaFile -> new MapEntry<>( javaFile.path(), javaFile.code() ), new Mapped<>(RootNode::java, this.nodes) ) ); } Tree(final Collection<RootNode> list); Map<String, Input> java(); Iterable<Directive> xml();  }