Package chat.model

Examples of chat.model.User


  }

  @Test(expected = ErrThrow.class)
  public void inUp_denyIn() throws Exception
  {
    User a = new User();
    a.name = a.password = "a";
    doSign.inUp(a);
    a = new User();
    a.name = "a";
    a.password = "b";
    doSign.inUp(a);
  }
View Full Code Here


  }

  @Test
  public void inUp_up2() throws Exception
  {
    User a = new User();
    a.name = a.password = "a";
    a = doSign.inUp(a);
    User b = new User();
    b.name = b.password = "b";
    b = doSign.inUp(b);
    asser(a.id != b.id);
  }
View Full Code Here

  @Test
  public void out() throws Exception
  {
    assertEquals(0, sess.me);
    assertEquals(false, sess.close);
    User a = new User();
    a.name = a.password = "a";
    doSign.inUp(a);
    doSign.out();
    assertEquals(0, sess.me);
    assertEquals(true, sess.close);
View Full Code Here

  @Service
  @Sign.Any
  public User inUp(User u_) throws Exception
  {
    validate(u_);
    User u = data.find1(User.class, "name", u_.name);
    // sign up
    if (u == null)
    {
      u = u_;
      u.friends = new HashSet<User>();
View Full Code Here

    return o;
  }

  void init() throws Exception
  {
    User foo = new User();
    foo.name = "admin";
    foo.password = "admin";
    save(foo, 11);
  }
View Full Code Here

TOP

Related Classes of chat.model.User

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.