Skip to content

Commit

Permalink
Fix invalid Java syntax and stale method references
Browse files Browse the repository at this point in the history
  • Loading branch information
celkins committed Apr 20, 2012
1 parent 1a1db87 commit 2c788b7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/source/manual/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ Next, write a test for serializing a ``Person`` instance to JSON:

.. code-block:: java
import com.yammer.dropwizard.testing.JsonHelpers.*;
import org.hamcrest.Matchers.*;
import static com.yammer.dropwizard.testing.JsonHelpers.*;
import static org.hamcrest.Matchers.*;
@Test
public void serializesToJSON() throws Exception {
final Person = new Person("Luther Blissett", "lb@example.com");
final Person person = new Person("Luther Blissett", "lb@example.com");
assertThat("a Person can be serialized to JSON",
asJSON(person),
asJson(person),
is(equalTo(jsonFixture("fixtures/person.json"))));
}
Expand All @@ -113,14 +113,14 @@ Next, write a test for deserializing a ``Person`` instance from JSON:

.. code-block:: java
import com.yammer.dropwizard.testing.JsonHelpers.*;
import org.hamcrest.Matchers.*;
import static com.yammer.dropwizard.testing.JsonHelpers.*;
import static org.hamcrest.Matchers.*;
@Test
public void serializesToJSON() throws Exception {
final Person = new Person("Luther Blissett", "lb@example.com");
assertThat("a Person can be serialized to JSON",
fromJSON(Person.class, jsonFixture("fixtures/person.json")),
public void deserializesFromJSON() throws Exception {
final Person person = new Person("Luther Blissett", "lb@example.com");
assertThat("a Person can be deserialized from JSON",
fromJson(jsonFixture("fixtures/person.json"), Person.class),
is(person));
}
Expand Down

0 comments on commit 2c788b7

Please sign in to comment.