Examples of Account


Examples of be.demmel.jgws.entities.Account

  }

  // just a placeholder that tests the configuration
  @Test
  public void placeHolderTest() {
    Account account = new Account(123, 1234, false, new byte[]{}, "root@gwca.be", "pass", 12, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344);
    // persist the user
    account = persist(account);

    // retrieve the user using his ID
    Account retrievedUser = retrieveById(Account.class, account.getId());

    Assert.assertEquals("root@gwca.be", retrievedUser.getEmail());
  }
View Full Code Here

Examples of bigbank.Account

//        }

        // Actual business logic
        Long id = ServletRequestUtils.getRequiredLongParameter(request, "id");
        Double amount = ServletRequestUtils.getRequiredDoubleParameter(request, "amount");
        Account a = bankService.readAccount(id);
        bankService.post(a, amount);

        return new ModelAndView("redirect:listAccounts.html");
    }
View Full Code Here

Examples of br.com.visualmidia.business.Account

       
        TableItem[] items = accountsTable.getItems();
        for (TableItem item : items) {
            if(item.getChecked()) {
                try {
                    Account account = (Account) system.query(new GetAccountByName(item.getText()));
                    accountsMap.put(account.getId(), account);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
View Full Code Here

Examples of co.cask.cdap.passport.meta.Account

   * */
  public AccountProvider<Account> getAccount(String apiKey) {
    Preconditions.checkNotNull(apiKey, "ApiKey cannot be null");

    try {
      Account account = accountCache.getIfPresent(apiKey);
      if (account == null) {
        String data = httpGet(API_BASE + "whois", apiKey);
        if (data != null) {
          Gson gson  = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
          account = gson.fromJson(data, Account.class);
View Full Code Here

Examples of com.Acrobot.ChestShop.Database.Account

            return usernameToUUID.get(username);
        }

        String shortenedName = NameUtil.stripUsername(username);

        Account account = null;

        try {
            account = accounts.queryBuilder().selectColumns("uuid").where().eq("shortName", shortenedName).queryForFirst();
        } catch (SQLException e) {
            e.printStackTrace();
            return null;
        }

        if (account == null) {
            UUID uuid = Bukkit.getOfflinePlayer(username).getUniqueId();
            usernameToUUID.put(username, uuid);

            return uuid;
        }

        UUID uuid = account.getUuid();

        if (uuid != null) {
            usernameToUUID.put(account.getName(), uuid);
        }

        return uuid;
    }
View Full Code Here

Examples of com.alibaba.sample.petstore.dal.dataobject.Account

    private void assertUser(User user, String... roles) {
        assertUser(user, true, roles);
    }

    private void assertUser(User user, boolean checkUserId, String... roles) {
        Account account = user.getAccount();
        Profile profile = user.getProfile();

        // user
        if (checkUserId) {
            assertTrue(arrayContains(new String[] { "j2ee", "admin" }, user.getUserId()));
        }

        assertEquals(null, user.getPassword()); // 密码不可查询

        if (isEmptyArray(roles)) {
            assertTrue(isEmptyArray(user.getRoles()));
        } else {
            assertArrayEquals(roles, user.getRoles());
        }

        // account
        assertEquals("yourname@yourdomain.com", account.getEmail());
        assertEquals("ABC", account.getFirstName());
        assertEquals("XYX", account.getLastName());
        assertEquals("OK", account.getStatus());
        assertEquals("901 San Antonio Road", account.getAddress1());
        assertEquals("MS UCUP02-206", account.getAddress2());
        assertEquals("Palo Alto", account.getCity());
        assertEquals("CA", account.getState());
        assertEquals("94303", account.getZip());
        assertEquals("US", account.getCountry());
        assertEquals("555-555-5555", account.getPhone());
        assertEquals("1234567", account.getCreditCardNumber());
        assertEquals("Visa", account.getCreditCardType());
        assertEquals("2005-12-15", new SimpleDateFormat("yyyy-MM-dd").format(account.getCreditCardExpiry()));
        assertEquals(12, account.getCreditCardExpiryMonth());
        assertEquals(2005, account.getCreditCardExpiryYear());

        // profile
        assertEquals("english", profile.getLanguagePreference());
        assertEquals("DOGS", profile.getFavoriteCategoryId());
    }
View Full Code Here

Examples of com.alvazan.test.db.Account

    Assert.assertNull(results.get(1).getValue());
  }
 
  @Test
  public void testMultipleXrefs() {
    Account acc = new Account();
    mgr.put(acc);
    mgr.flush();
    acc = mgr.find(Account.class, acc.getId());
   
    User user = new User();
    user.setName("deab");
    User user2 = new User();
    user2.setName("bob");
   
    mgr.fillInWithKey(acc);
    mgr.fillInWithKey(user);
    mgr.fillInWithKey(user2);
   
    EmailAccountXref ref1 = new EmailAccountXref(user, acc);
    EmailAccountXref ref2 = new EmailAccountXref(user2, acc);
   
    mgr.put(ref1);
    mgr.put(ref2);
    mgr.put(acc);
    mgr.put(user);
   
    mgr.flush();
   
    Account result = mgr.find(Account.class, acc.getId());
    Assert.assertEquals(2, result.getEmails().size());
  }
View Full Code Here

Examples of com.apress.prospring.ch12.domain.Account

    int count = manager.count();
    int failures = 0;
    int attempts = 100;
   
    for (int i = 0; i < attempts; i++) {
      Account a = new Account();
      a.setBalance(new BigDecimal(10));
      a.setNumber("123 " + i);
      a.setSortCode("xxx " + i);
      try {
        manager.insert(a);
      } catch (RuntimeException ex) {
        System.out.println("Failed to insert account " + ex.getMessage());
        failures++;
View Full Code Here

Examples of com.astech.domain.Account

    /**
     * Returns a new Account instance filled with random values.
     */
    public Account getAccount() {
        Account account = new Account();

        // simple attributes follows
        account.setLogin("a");
        account.setPassword("a");
        account.setEmail("dummy@dummy.com");
        // mandatory relation
        Role roleRef = roleGenerator.getRole();
        roleRepository.save(roleRef);
        account.setRoleRef(roleRef);
        return account;
    }
View Full Code Here

Examples of com.atlauncher.data.Account

        openFolder = new JButton(Language.INSTANCE.localize("common.openfolder"));
        updateData = new JButton(Language.INSTANCE.localize("common.updatedata"));

        username = new JComboBox<Account>();
        username.setRenderer(new AccountsDropDownRenderer());
        fillerAccount = new Account(Language.INSTANCE.localize("account.select"));
        username.addItem(fillerAccount);
        for (Account account : App.settings.getAccounts()) {
            username.addItem(account);
        }
        Account active = App.settings.getAccount();
        if (active == null) {
            username.setSelectedIndex(0);
        } else {
            username.setSelectedItem(active);
        }
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.