Package test.utils.json

Examples of test.utils.json.DateObj


    Assert.assertThat(m2.map3.get("m31")[3], is(6));
  }
 
  @Test
  public void test10() throws Throwable {
    DateObj obj = new DateObj();
    obj.setDate(new Date());
   
    StringBuilder strBuilder = new StringBuilder(100);
    for (int i = 0; i < 100; i++) {
      strBuilder.append(i).append("+");
    }
    obj.setByteArr(strBuilder.toString().getBytes("utf-8"));
   
    String json = Json.toJson(obj);
   
    DateObj obj2 = Json.toObject(json, DateObj.class);
    System.out.println(SafeSimpleDateFormat.defaultDateFormat.format(obj2.getDate()));
    Assert.assertThat(new String(obj2.getByteArr(), "utf-8"), is("0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+35+36+37+38+39+40+41+42+43+44+45+46+47+48+49+50+51+52+53+54+55+56+57+58+59+60+61+62+63+64+65+66+67+68+69+70+71+72+73+74+75+76+77+78+79+80+81+82+83+84+85+86+87+88+89+90+91+92+93+94+95+96+97+98+99+"));
  }
View Full Code Here

TOP

Related Classes of test.utils.json.DateObj

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.