Skip to content

Commit

Permalink
tidy up with a static import of matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
scarytom committed May 17, 2012
1 parent f8668c7 commit 91eef7e
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -4,7 +4,6 @@
import java.util.List;
import java.util.Properties;

import org.hamcrest.Matchers;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -15,6 +14,7 @@
import com.timgroup.blondin.testutil.TrivialHttpServer;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.is;

Expand Down Expand Up @@ -54,7 +54,7 @@ public void shutdownGraphiteServer() {
statsd.waitForFirstConnection();

assertThat(statsd.messagesReceived().size(), is(greaterThan(0)));
assertThat(statsd.messagesReceived(), Matchers.contains(prefix + "requests.normal:1|c"));
assertThat(statsd.messagesReceived(), contains(prefix + "requests.normal:1|c"));
}

@Test(timeout=5000L) public void
Expand All @@ -65,7 +65,7 @@ public void shutdownGraphiteServer() {
statsd.waitForFirstConnection();

assertThat(statsd.messagesReceived().size(), is(greaterThan(0)));
assertThat(statsd.messagesReceived(), Matchers.contains(prefix + "requests.expensive:1|c"));
assertThat(statsd.messagesReceived(), contains(prefix + "requests.expensive:1|c"));
}

}

0 comments on commit 91eef7e

Please sign in to comment.