Package org.apache.rave.portal.model.impl

Examples of org.apache.rave.portal.model.impl.AddressImpl


        assertThat(addressConverter.convert(address), is(nullValue()));
    }

    @Test
    public void newAddress() {
        Address address = new AddressImpl();
        address.setStreetAddress("1600 Pennsylvania Avenue");
        address.setLocality("Washington DC");
        address.setCountry("USA");
        address.setRegion("Washington DC");
        address.setPrimary(true);

        JpaAddress converted = addressConverter.convert(address);
        assertThat(converted, is(not(sameInstance(address))));
        assertThat(converted, is(instanceOf(JpaAddress.class)));
        assertThat(converted.getStreetAddress(), is(equalTo(address.getStreetAddress())));
        assertThat(converted.getLocality(), is(equalTo(address.getLocality())));
        assertThat(converted.getCountry(), is(equalTo(address.getCountry())));
        assertThat(converted.getRegion(), is(equalTo(address.getRegion())));
        assertThat(converted.getPrimary(), is(true));
    }
View Full Code Here



    @Test
    public void convertValid() {
        Organization template = new OrganizationImpl();
        template.setAddress(new AddressImpl("123 Sesame Street"));
        template.setDescription("TEST_A");
        template.setEndDate(new Date());
        template.setField("TEST_B");
        template.setName("TEST_C");
        template.setStartDate(new Date());
View Full Code Here

    }

    @Test
    public void converts() {
        new JpaConverter(converters);
        assertThat(JpaConverter.getInstance().convert(new AddressImpl(), Address.class), is(instanceOf(JpaAddress.class)));
        assertThat(JpaConverter.getInstance().convert(new PersonImpl(), Person.class), is(instanceOf(JpaPerson.class)));

    }
View Full Code Here

        properties.add(new PersonPropertyImpl("1", "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl("1", "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl("1", "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl("1", "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
        address.setLocality(CITY);
        address.setRegion(STATE);
        address.setPostalCode(POSTAL_CODE);
        address.setStreetAddress(STREET);
        address.setQualifier(QUALIFIER);
        List<org.apache.rave.model.Address> addresses = new ArrayList<org.apache.rave.model.Address>();
        addresses.add(new AddressImpl());
        addresses.add(address);
        person.setAddresses(addresses);

        return person;
    }
View Full Code Here

    }

    @Test
    public void converts() {
        new JpaConverter(converters);
        assertThat(JpaConverter.getInstance().convert(new AddressImpl(), Address.class), is(instanceOf(JpaAddress.class)));
        assertThat(JpaConverter.getInstance().convert(new PersonImpl(), Person.class), is(instanceOf(JpaPerson.class)));

    }
View Full Code Here

        properties.add(new PersonPropertyImpl(1L, "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl(1L, "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl(1L, "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl(1L, "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.portal.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
        address.setLocality(CITY);
        address.setRegion(STATE);
        address.setPostalCode(POSTAL_CODE);
        address.setStreetAddress(STREET);
        address.setQualifier(QUALIFIER);
        List<org.apache.rave.portal.model.Address> addresses = new ArrayList<org.apache.rave.portal.model.Address>();
        addresses.add(new AddressImpl());
        addresses.add(address);
        person.setAddresses(addresses);

        return person;
    }
View Full Code Here

        properties.add(new PersonPropertyImpl("1", "profileSong", LINK_VALUE, LINK_TEXT, null, false));
        properties.add(new PersonPropertyImpl("1", "lookingFor", LookingFor.FRIENDS.toString(), null, null, false));
        properties.add(new PersonPropertyImpl("1", "currentLocation", QUALIFIER, null, null, null));
        properties.add(new PersonPropertyImpl("1", "account", IM_1, "1", IM_PROVIDER_1, false));
        person.setProperties(properties);
        org.apache.rave.portal.model.Address address = new AddressImpl();
        address.setCountry(COUNTRY);
        address.setLatitude(LATITUDE);
        address.setLongitude(LONGITUDE);
        address.setLocality(CITY);
        address.setRegion(STATE);
        address.setPostalCode(POSTAL_CODE);
        address.setStreetAddress(STREET);
        address.setQualifier(QUALIFIER);
        List<org.apache.rave.portal.model.Address> addresses = new ArrayList<org.apache.rave.portal.model.Address>();
        addresses.add(new AddressImpl());
        addresses.add(address);
        person.setAddresses(addresses);

        return person;
    }
View Full Code Here

    }

    @Test
    public void converts() {
        new JpaConverter(converters);
        assertThat(JpaConverter.getInstance().convert(new AddressImpl(), Address.class), is(instanceOf(JpaAddress.class)));
        assertThat(JpaConverter.getInstance().convert(new PersonImpl(), Person.class), is(instanceOf(JpaPerson.class)));

    }
View Full Code Here


    @Test
    public void convertValid() {
        Organization template = new OrganizationImpl();
        template.setAddress(new AddressImpl("123 Sesame Street"));
        template.setDescription("TEST_A");
        template.setEndDate(new Date());
        template.setField("TEST_B");
        template.setName("TEST_C");
        template.setStartDate(new Date());
View Full Code Here

        assertThat(addressConverter.convert(address), is(nullValue()));
    }

    @Test
    public void newAddress() {
        Address address = new AddressImpl();
        address.setStreetAddress("1600 Pennsylvania Avenue");
        address.setLocality("Washington DC");
        address.setCountry("USA");
        address.setRegion("Washington DC");
        address.setPrimary(true);

        JpaAddress converted = addressConverter.convert(address);
        assertThat(converted, is(not(sameInstance(address))));
        assertThat(converted, is(instanceOf(JpaAddress.class)));
        assertThat(converted.getStreetAddress(), is(equalTo(address.getStreetAddress())));
        assertThat(converted.getLocality(), is(equalTo(address.getLocality())));
        assertThat(converted.getCountry(), is(equalTo(address.getCountry())));
        assertThat(converted.getRegion(), is(equalTo(address.getRegion())));
        assertThat(converted.getPrimary(), is(true));
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.impl.AddressImpl

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.