Package org.fao.geonet.domain

Examples of org.fao.geonet.domain.Address


    public void testExecAsUserNoGroups() throws Exception {
        final User entity = UserRepositoryTest.newUser(inc);
        entity.setProfile(Profile.Editor);

        entity.getAddresses().add(
                new Address()
                        .setAddress("add1")
                        .setCity("city1")
                        .setCountry("country1")
                        .setState("state1")
                        .setZip("zip1"));
View Full Code Here


    @Autowired
    AddressRepository _repo;

    @Test
    public void testFindOne() {
        Address address1 = newAddress();
        address1 = _repo.save(address1);

        Address address2 = newAddress();
        address2 = _repo.save(address2);

        assertEquals(address2, _repo.findOne(address2.getId()));
        assertEquals(address1, _repo.findOne(address1.getId()));
    }
View Full Code Here

        assertEquals(address1, _repo.findOne(address1.getId()));
    }

    @Test
    public void testFindAllByZip() {
        Address address1 = newAddress();
        address1 = _repo.save(address1);

        Address address2 = newAddress();
        address2 = _repo.save(address2);

        List<Address> addresses = _repo.findAllByZip(address1.getZip());

        assertEquals(1, addresses.size());
        assertEquals(address1.getZip(), addresses.get(0).getZip());

        addresses = _repo.findAllByZip(address2.getZip());

        assertEquals(1, addresses.size());
        assertEquals(address2.getZip(), addresses.get(0).getZip());
    }
View Full Code Here

    private Address newAddress() {
        return newAddress(_inc);
    }
    public static Address newAddress(AtomicInteger inc) {
        int val = inc.incrementAndGet();
        Address Address = new Address().setAddress("address" + val).setCity("city" + val).setCountry("country" + val).setState("state"
                                                                                                                               + val)
                .setZip("zip" + val);
        return Address;
    }
View Full Code Here

                .setProfile(Profile.findProfileIgnoreCase(profile))
                .setSurname(surname)
                .setUsername(username);
        user.getSecurity().setPassword(passwordHash);
        user.getEmailAddresses().add(email);
        user.getAddresses().add(new Address().setAddress(address).setCountry(country).setCity(city).setState(state).setZip(zip));

        userRepository.save(user);

        // The user is created as registereduser on the GUEST group, and not mapped on the specific optional
        // profile. Then the catalogue administrator could manage the created user.
View Full Code Here

            vars.put("$IND_NAME", contact.getName() + " " + contact.getSurname());
            vars.put("$ORG_NAME", contact.getOrganisation());
            vars.put("$POS_NAME", contact.getProfile().name());
            vars.put("$VOICE", "");
            vars.put("$FACSCIMILE", "");
            final Address address = contact.getPrimaryAddress();
            vars.put("$DEL_POINT", address.getAddress());
            vars.put("$CITY", address.getCity());
            vars.put("$ADMIN_AREA", address.getState());
            vars.put("$POSTAL_CODE", address.getZip());
            vars.put("$COUNTRY", address.getCountry());
            vars.put("$EMAIL", contact.getEmail());
            vars.put("$HOUROFSERVICE", "");
            vars.put("$CONTACT_INSTRUCTION","");
        } else {
            vars.put("$IND_NAME", "");
View Full Code Here

TOP

Related Classes of org.fao.geonet.domain.Address

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.