Examples of User


Examples of games.stendhal.client.entity.User

    assertEquals("Pick up cursor",
        cursors.get(StendhalCursor.ITEM_PICK_UP_FROM_SLOT).toString(),
        panel.getCursor().toString());
   
    // Repeat the checks with an user owned slot
    User user = new User();
    panel.setParent(user);
    /*
     * Comparing empty slots first because normally the parent of the slot
     * does not change from User to a non-user or vice versa, so ItemPanel
     * does not handle the situation.
View Full Code Here

Examples of gameserver.User

                    Output.debug("Checking consistency...");
                    initTime = System.currentTimeMillis();

                    // user properties
                    for(User u: server.getUsers()){
                        User u2 = server.getUser(u.username);
                        if(u != u2)
                            throw new Exception(
                                    "1 - Users should be the same");
                        if(u.level == UserLevel.NONE)
                            throw new Exception(
View Full Code Here

Examples of gotnames.dm.User

           final boolean disableEmail = cells.size() > 4 && Boolean.valueOf(strip(cells.get(4)).toLowerCase());
           final boolean admin = cells.size() > 5 && Boolean.valueOf(strip(cells.get(5)).toLowerCase());
          
           return new KTrans<User>(pm) {
            @Override protected User call() {
               User u = QueryBuilder.begin(pm, User.class).getSingleByField("email", email);
               if (u == null) {
                 u = User.newUser(groupKey);
                 u.setEmail(email);
               }
               u.setFirstName(firstName);
               u.setLastName(lastName);
               u.setGender(gender);
               u.setDisableEmail(disableEmail);
               u.setAdmin(admin);
              
               ProfilePictureData profilePicture = profilePics.get(u.getFullName());
               if (profilePicture != null)
                 u.setProfilePictureInfo(profilePicture);
              
               pm.makePersistent(u);
              
              msg.add("User saved: " + u.getFullName());
               return u;
            }
           }.go();
        }
       });
      
       for (User u : users) {
         // Update profile picture if present
        ProfilePicture.saveProfilePicture(u, pm, profilePics.get(u.getFullName()));
       }
     
      return rawStringUtf8("OK; updated " + rows.size() + " users\n\n" + Strings.join("\n", msg));
    } catch (IOException e) {
      return rawStringUtf8("Unable to read ZIP archive: " + e.getMessage());
View Full Code Here

Examples of gov.nasa.arc.mct.services.internal.component.User

        Assert.assertEquals(comp.getClass(), TelemetryUserDropBoxComponent.class);
        Assert.assertEquals(comp.getOwner(), "*");
        Assert.assertEquals(comp.getCreator(), id);
       
        // Verify that policy allows Remove Manifestation here
        User mockUser = Mockito.mock(User.class);
        Mockito.when(mockPlatform.getCurrentUser()).thenReturn(mockUser);
        Mockito.when(mockUser.getUserId()).thenReturn(id);
       
        PolicyContext context = new PolicyContext();
        AbstractComponent mockChild = Mockito.mock(AbstractComponent.class);
        context.setProperty(PolicyContext.PropertyName.TARGET_COMPONENT.getName(), comp);
        context.setProperty(PolicyContext.PropertyName.SOURCE_COMPONENTS.getName(), Collections.singleton(mockChild));
View Full Code Here

Examples of hibernate.User

      if(userExists){
        return UserFactory.id(0); //ID of zero means failed to find
      }
      else{
        // Not found? Create the new user and add them to the database
        User newUser = UserFactory.createUser(firstName,lastName,email,password);
        int myID = myTools.dataEntry(newUser);
       
        // search the database to confirm
        boolean userFound = myTools.dataSearch("User", "email", newUser.getEmail());
         
        // Respond to let them know it was successful (like login API)
        if(userFound){
          return UserFactory.id(myID); //return ID
        }
View Full Code Here

Examples of hotel.model.User

    String role = request.getParameter("role");
    int i = Misc.toInt(role, -1);
    if (null == username || null == password) {
      return "login";
    }
    User user = userService.login(username.trim(), password.trim(), i);
    if (null == user) {
      request.setAttribute("errMsg",
          "用户名不存在或账户已冻结,登录失败!请确认用户名输入正确,或联系管理员!");
      return "login";
    }
View Full Code Here

Examples of httl.test.model.User

 
    @Parameters
    public static Collection<Object[]> prepareData() throws Exception {
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    format.setTimeZone(TimeZone.getTimeZone("+0"));
    User user = new User("liangfei", "admin", "Y", 1, 3);
    Book[] books = new Book[10];
    books[0] = new Book("Practical API Design", "Jaroslav Tulach", "Apress", format.parse("2008-07-29"), 75, 85);
    books[1] = new Book("Effective Java", "Joshua Bloch", "Addison-Wesley Professional", format.parse("2008-05-28"), 55, 70);
    books[2] = new Book("Java Concurrency in Practice", "Doug Lea", "Addison-Wesley Professional", format.parse("2006-05-19"), 60, 60);
    books[3] = new Book("Java Programming Language", "James Gosling", "Prentice Hall", format.parse("2005-08-27"), 65, 75);
    books[4] = new Book("Domain-Driven Design", "Eric Evans", "Addison-Wesley Professional", format.parse("2003-08-30"), 70, 80);
    books[5] = new Book("Agile Project Management with Scrum", "Ken Schwaber", "Microsoft Press", format.parse("2004-03-10"), 40, 80);
    books[6] = new Book("J2EE Development without EJB", "Rod Johnson", "Wrox", format.parse("2011-09-17"), 40, 70);
    books[7] = new Book("Design Patterns", "Erich Gamma", "Addison-Wesley Professional", format.parse("1994-11-10"), 60, 80);
    books[8] = new Book("Agile Software Development, Principles, Patterns, and Practices", " Robert C. Martin", "Prentice Hall", format.parse("2002-10-25"), 80, 75);
    books[9] = new Book("Design by Contract, by Example", "Richard Mitchell", "Addison-Wesley Publishing Company", format.parse("2001-10-22"), 50, 85);
    user.setBook(books[0]);
    Book[] books2 = new Book[2];
    books2[0] = new Book("Practical API Design2", "Jaroslav Tulach", "Apress", format.parse("2010-07-29"), 75, 85);
    books2[1] = new Book("Effective Java2", "Joshua Bloch", "Addison-Wesley Professional", format.parse("2010-05-28"), 55, 70);
    Map<String, Book> bookmap = new TreeMap<String, Book>();
    Map<String, Map<String, Object>> mapbookmap = new TreeMap<String, Map<String, Object>>();
View Full Code Here

Examples of hudson.model.User

    @Test
    public void testConvertRecipientList_userName()
            throws AddressException, IOException, UnsupportedEncodingException {
        Mailer.descriptor().setDefaultSuffix("@gmail.com");
        User u = User.get("advantiss");
        u.setFullName("Peter Samoshkin");
        Mailer.UserProperty prop = new Mailer.UserProperty("advantiss@xxx.com");
        u.addProperty(prop);

        InternetAddress[] internetAddresses = emailRecipientUtils.convertRecipientString("advantiss", envVars).toArray(new InternetAddress[0]);

        assertEquals(1, internetAddresses.length);
        assertEquals("advantiss@xxx.com", internetAddresses[0].getAddress());
View Full Code Here

Examples of in.partake.model.dto.User

public class UserTestDataProvider extends TestDataProvider<User> {

    @Override
    public User create(long pkNumber, String pkSalt, int objNumber) {
        UUID id = new UUID(pkNumber, ("user" + pkSalt).hashCode());
        return new User(id.toString(), "screenName" + objNumber, "http://www.example.com/", new DateTime(0), null, false);
    }
View Full Code Here

Examples of info.archinnov.achilles.test.integration.entity.User

    @Test
    public void should_bootstrap_embedded_server_and_entity_manager() throws Exception {

        Long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
        manager.insert(new User(id, "fn", "ln"));

        Row row = session.execute("SELECT * FROM User WHERE id=" + id).one();

        assertThat(row).isNotNull();

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.