@Test public void failIfRedWhenRed() throws Exception { try { new SimpleNullfree( new SimpleSources( Collections.singletonList( new JavaSourceFile( "package simple.pkg;\n", "\n", "class B {\n", " void a() {\n", " String foo = null;", " }\n", " static class A {\n", " void b() {\n", " new Runnable() {\n", " public void run() {\n", " String name = null;\n", " }\n", " };\n", " }\n", " }\n", "}\n" ) ) ), SimpleBadge::new ).badge().failIfRed(); Assert.fail(); } catch (NullfreeException e) { } }
@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();  }