Package com.sivalabs.myapp.entities

Examples of com.sivalabs.myapp.entities.Person


  public void test_get()
  {
    RestTemplate rt = new RestTemplate();
    String url = baseUrl+"/persons/1";
    ResponseEntity<Person> responseEntity = rt.getForEntity(url , Person.class);
    Person person = responseEntity.getBody();
    Assert.assertNotNull(person);
  }
View Full Code Here


  @Test
  public void test_create()
  {
    RestTemplate rt = new RestTemplate();
    String url = baseUrl+"/persons/";
    Person person = new Person();
    person.setEmail("bot@gmail.com");
    person.setPassword("secret");
    person.setName("SuperBot");
    person.setDob(new Date());
   
    ResponseEntity<Person> responseEntity = rt.postForEntity(url , person, Person.class);
    person = responseEntity.getBody();
    Assert.assertNotNull(person);
    System.out.println(person.getId());
  }
View Full Code Here

TOP

Related Classes of com.sivalabs.myapp.entities.Person

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.