adam bien's blog

Rulz For EntityManager v0.0.2 and Rulz For JAX-RS Released v0.0.3 📎

New releases of Rulz EntityManager and Rulz JAX-RS are available in maven central.

JAX-RS provider comes with three custom matchers (successful(), noContent() and created()):


import static com.airhacks.rulz.jaxrsclient.HttpMatchers.successful;

public class JAXRSClientProviderTest {

    @Rule
    public JAXRSClientProvider provider = JAXRSClientProvider.buildWithURI("http://www.java.com");

    @Test
    public void pingJavaAndVerifyWithMatcher() {

        Response response = (...)
        assertThat(response, is(successful()));
    }


Now the whole library comprises 2 classes...

The Rulz For EntityManager comes with no additional features -- just a superfluous persistence.xml was removed from the project.

See Rulz in episode 5 in the online version of the Effective Java EE 7 workshop.