Package test.utils.json

Examples of test.utils.json.Profile


  }
 
  @Test
  public void test12() {
    String json = "{\"totalreadtime\":5,\"notecount\":27,\"timeintervalreadtime\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,0,0,0,0,0,0],\"bookcollect\":0,\"screenshotshare\":0,\"readbooktype\":{\"测试\":1,\"测试一下\":23},\"bookshare\":0,\"readbookcount\":0,\"noteshare\":0}";
    Profile p = Json.toObject(json, Profile.class);
    Assert.assertThat(p.getTotalreadtime(), is(5));
    Assert.assertThat(p.getNotecount(), is(27));
    Assert.assertThat(p.getTimeintervalreadtime().length, is(24));
    Assert.assertThat(p.getTimeintervalreadtime()[16], is(4));
    Assert.assertThat(p.getReadbooktype().get("测试一下"), is(23));
  }
View Full Code Here

TOP

Related Classes of test.utils.json.Profile

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.