Package chat.model

Examples of chat.model.Chat


  @Test
  public void post_meToMe() throws Exception
  {
    signIn();
    Chat c = new Chat();
    c.in = u1;
    c.text = clob("post1");
    c.datime = DATE0;
    long time = System.currentTimeMillis();
    doChat.post(c, null);
View Full Code Here


  @Test(expected = ErrThrow.class)
  public void post_notFriend() throws Exception
  {
    signIn();
    Chat c = new Chat();
    c.in = u2;
    c.text = clob("post1");
    c.datime = DATE0;
    doChat.post(c, null);
  }
View Full Code Here

    doChat.doSign.inUp(u2);
    doChat.doUser.update(u2);
    (u1.friends_ = u1.friends).add(u2);
    doChat.doSign.inUp(u1);
    doChat.doUser.update(u1);
    Chat c = new Chat();
    c.in = u2;
    c.text = clob("post1");
    c.datime = DATE0;
    doChat.post(c, null);
  }
View Full Code Here

  @Test
  public void read_meToMe() throws Exception
  {
    signIn();
    Chat c = new Chat();
    c.in = u1;
    c.text = clob("post1");
    c.datime = DATE0;
    doChat.post(c, null);
    Chat cc = new Chat();
    cc.in = u1;
    List<Chat> s = doChat.read(cc);
    asserts(BAG, new Chat[] { c }, s);
    cc = s.get(0);
    assertEquals(c.in, cc.in);
View Full Code Here

  @Test
  public void read_meToMe_datime() throws Exception
  {
    signIn();
    Chat c = new Chat();
    c.in = u1;
    c.text = clob("post1");
    c.datime = DATE0;
    doChat.post(c, null);
    Chat cc = new Chat();
    cc.in = u1;
    cc.datime = c.datime;
    assertEquals(0, doChat.read(cc).size());
    cc.datime = new Date(c.datime.getTime() - 1);
    asserts(BAG, new Chat[] { c }, doChat.read(cc));
View Full Code Here

    doChat.doUser.update(u2);
    (u1.friends_ = u1.friends).add(u2);
    doChat.doSign.inUp(u1);
    doChat.doUser.update(u1);

    Chat c = new Chat();
    c.in = u2;
    c.text = clob("post1");
    c.datime = DATE0;
    doChat.post(c, null);
    doChat.doSign.inUp(u2);
    c.in = u1;
    c.text = clob("post1");
    doChat.post(c, null);

    Chat cc = new Chat();
    cc.in = u1;
    cc.datime = c.datime;
    assertEquals(0, doChat.read(cc).size());
    cc.datime = new Date(c.datime.getTime() - 1);
    asserts(BAG, new Chat[] { c }, doChat.read(cc));
View Full Code Here

TOP

Related Classes of chat.model.Chat

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.