@Test public void failIfRedWhenGreen() throws Exception { try { new SimpleNullfree( new SimpleSources( Collections.singletonList( new JavaSourceFile( "class B {\n", " void a() {\n", " String foo = \"bar\";", " }\n", "}\n" ) ) ), SimpleBadge::new ).badge().failIfRed(); } catch (NullfreeException e) { Assert.fail(); } }
@Override public Badge badge() throws NullfreeException { return badgeFactory.execute(sources.nulls()); }
SimpleNullfree implements Nullfree { @Override public Badge badge() throws NullfreeException { return badgeFactory.execute(sources.nulls()); } }
SimpleNullfree implements Nullfree { @Override public Badge badge() throws NullfreeException { return badgeFactory.execute(sources.nulls()); } SimpleNullfree(
        final Sources sources,
        final Function1<Badge, Nulls, NullfreeException> badgeFactory
    ); }
SimpleNullfree implements Nullfree { @Override public Badge badge() throws NullfreeException { return badgeFactory.execute(sources.nulls()); } SimpleNullfree(
        final Sources sources,
        final Function1<Badge, Nulls, NullfreeException> badgeFactory
    ); @Override Badge badge(); }
SimpleNullfree implements Nullfree { @Override public Badge badge() throws NullfreeException { return badgeFactory.execute(sources.nulls()); } SimpleNullfree(
        final Sources sources,
        final Function1<Badge, Nulls, NullfreeException> badgeFactory
    ); @Override Badge badge();  }