Person p = new Person("some name", 123, new Address("street A", "city A", "state A", 12345, true), new Address("street B", "city B", "state B", 12345, false) p = new Person("some name", 123, new Address("street A", "city A", "state A", 12345, true), new Address("street B", "city B", "state B", 12345, false)
@Test public void testAddressBook() { PojoRest model; model = new PojoRest(new AddressBook()); // Try adding a person to the address book. Person billClinton = new Person("Bill Clinton", 65, new Address("55W. 125th Street", "New York", "NY", 10027, true) ); model.post("/", billClinton); // Make sure we get the original person back. billClinton = (Person)model.get("/0"); }
@Test public void testConstructors() throws Exception { PojoRest model = new PojoRest(new AddressBook(), JsonParser.DEFAULT); // Try adding a person to the address book. Person billClinton = new Person("Bill Clinton", 65, new Address("55W. 125th Street", "New York", "NY", 10027, true) ); model.post("/", billClinton); // Make sure we get the original person back. billClinton = (Person)model.get("/0"); }
public AddressBook init() { add( new Person("Bill Clinton", 65, new Address("55W. 125th Street", "New York", "NY", 10027, true) ) ); return this; } }