Package org.apache.rave.portal.model

Examples of org.apache.rave.portal.model.Address


    @Autowired
    private JpaAddressConverter addressConverter;

    @Test
    public void noConversion() {
        Address address = new JpaAddress();
        assertThat(addressConverter.convert(address), is(sameInstance(address)));
    }
View Full Code Here


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

    @Test
    public void nullConversion() {
        Address address = null;
        assertThat(addressConverter.convert(address), is(nullValue()));
    }
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.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.