Package org.broadleafcommerce.profile.core.domain

Examples of org.broadleafcommerce.profile.core.domain.PhoneImpl


public class PhoneDataProvider {

    @DataProvider(name = "setupPhone")
    public static Object[][] createPhone() {
        Phone phone = new PhoneImpl();
        phone.setPhoneNumber("999-999-9999");

        return new Object[][] { new Object[] { phone } };
    }
View Full Code Here


public class CustomerPhoneDataProvider {

    @DataProvider(name = "setupCustomerPhone")
    public static Object[][] createCustomerPhone() {
        CustomerPhone cp1 = new CustomerPhoneImpl();
        Phone phone1 = new PhoneImpl();
        phone1.setPhoneNumber("111-111-1111");
        cp1.setPhone(phone1);
        cp1.setPhoneName("phone1");

        CustomerPhone cp2 = new CustomerPhoneImpl();
        Phone phone2 = new PhoneImpl();
        phone1.setPhoneNumber("222-222-2222");
        cp2.setPhone(phone2);
        cp2.setPhoneName("phone2");

        return new Object[][] { new Object[] { cp1 }, new Object[] { cp2 } };
View Full Code Here

        address1.setDefault(true);
        address1.setFirstName("John");
        address1.setLastName("Tester");
        address1.setPostalCode("75244");

        Phone primary = new PhoneImpl();
        primary.setPhoneNumber("972-976-1234");
        address1.setPhonePrimary(primary);
       
        State state = new StateImpl();
        state.setAbbreviation("TX");
        state.setCountry(country);
        state.setName("Texas");
       
        address1.setState(state);
        fg1.setAddress(address1);
        fg1.setOrder(order);
        fg1.setPrimary(true);
        fg1.setRetailShippingPrice(new Money(10D));
        fg1.setShippingPrice(new Money(10D));
        fg1.setType(FulfillmentType.PHYSICAL_SHIP);
        fg1.setOrder(order);
       
        FulfillmentGroupItem fgItem1 = new FulfillmentGroupItemImpl();
        fgItem1.setFulfillmentGroup(fg1);
        fgItem1.setOrderItem(orderItem1);
        fgItem1.setQuantity(2);
        //fgItem1.setRetailPrice(new Money(19.99D));
        fg1.getFulfillmentGroupItems().add(fgItem1);
       
        order.getFulfillmentGroups().add(fg1);
       
        FulfillmentGroup fg2 = new FulfillmentGroupImpl();
        fg2.setId(2L);
        Address address2 = new AddressImpl();
        address2.setAddressLine1("124 Test Road");
        address2.setCity("Dallas");
       
        Country country2 = new CountryImpl();
        country2.setAbbreviation("US");
        country2.setName("United States");
       
        address2.setCountry(country2);
        address2.setDefault(true);
        address2.setFirstName("John");
        address2.setLastName("Tester");
        address2.setPostalCode("75244");

        Phone primary2 = new PhoneImpl();
        primary2.setPhoneNumber("972-976-1234");
        address2.setPhonePrimary(primary2);
       
        State state2 = new StateImpl();
        state2.setAbbreviation("TX");
        state2.setCountry(country2);
View Full Code Here

        address1.setDefault(true);
        address1.setFirstName("John");
        address1.setLastName("Tester");
        address1.setPostalCode("75244");

        Phone primary = new PhoneImpl();
        primary.setPhoneNumber("972-976-1234");
        address1.setPhonePrimary(primary);

        State state = new StateImpl();
        state.setAbbreviation("TX");
        state.setCountry(country);
        state.setName("Texas");

        address1.setState(state);
        fg1.setAddress(address1);
        fg1.setOrder(order);
        fg1.setPrimary(true);
        fg1.setRetailShippingPrice(new Money(10D));
        fg1.setShippingPrice(new Money(10D));
        fg1.setType(FulfillmentType.PHYSICAL_SHIP);
        fg1.setOrder(order);

        FulfillmentGroupItem fgItem1 = new FulfillmentGroupItemImpl();
        fgItem1.setFulfillmentGroup(fg1);
        fgItem1.setOrderItem(orderItem1);
        fgItem1.setQuantity(2);
        //fgItem1.setRetailPrice(new Money(19.99D));
        fg1.getFulfillmentGroupItems().add(fgItem1);

        order.getFulfillmentGroups().add(fg1);

        FulfillmentGroup fg2 = new FulfillmentGroupImpl();
        fg2.setId(2L);
        Address address2 = new AddressImpl();
        address2.setAddressLine1("124 Test Road");
        address2.setCity("Dallas");

        Country country2 = new CountryImpl();
        country2.setAbbreviation("US");
        country2.setName("United States");

        address2.setCountry(country2);
        address2.setDefault(true);
        address2.setFirstName("John");
        address2.setLastName("Tester");
        address2.setPostalCode("75244");

        Phone primary2 = new PhoneImpl();
        primary2.setPhoneNumber("972-976-1234");
        address2.setPhonePrimary(primary2);

        State state2 = new StateImpl();
        state2.setAbbreviation("TX");
        state2.setCountry(country2);
View Full Code Here

    public void createCustomerPhone(CustomerPhone customerPhone) {
        userName = "customer1";
        Customer customer = customerService.readCustomerByUsername(userName);
        assert customerPhone.getId() == null;
        customerPhone.setCustomer(customer);
        Phone phone = new PhoneImpl();
        phone.setPhoneNumber("214-214-2134");
        customerPhone.setPhone(phone);
        customerPhone = customerPhoneService.saveCustomerPhone(customerPhone);
        assert customer.equals(customerPhone.getCustomer());
        userId = customerPhone.getCustomer().getId();
    }
View Full Code Here

public class CustomerPhoneControllerTestDataProvider {

    @DataProvider(name = "setupCustomerPhoneControllerData")
    public static Object[][] createCustomerPhone() {
        PhoneNameForm pnf1 = new PhoneNameForm();
        Phone phone1 = new PhoneImpl();
        phone1.setPhoneNumber("111-222-3333");
        pnf1.setPhone(phone1);
        pnf1.setPhoneName("phone_1");

        PhoneNameForm pnf2 = new PhoneNameForm();
        Phone phone2 = new PhoneImpl();
        phone2.setPhoneNumber("222-333-4444");
        pnf2.setPhone(phone2);
        pnf2.setPhoneName("phone_2");

        return new Object[][] { new Object[] { pnf1 }, new Object[] { pnf2 } };
    }
View Full Code Here

    private boolean isSameAddress;

    public CheckoutForm() {
        shippingAddress = new AddressImpl();
        billingAddress = new AddressImpl();
        shippingAddress.setPhonePrimary(new PhoneImpl());
        billingAddress.setPhonePrimary(new PhoneImpl());
        shippingAddress.setCountry(new CountryImpl());
        billingAddress.setCountry(new CountryImpl());
        shippingAddress.setState(new StateImpl());
        billingAddress.setState(new StateImpl());
        isSameAddress = true;
View Full Code Here

    protected Address address = new AddressImpl();
    protected String addressName;
    protected Long customerAddressId;

    public CustomerAddressForm() {
        address.setPhonePrimary(new PhoneImpl());
    }
View Full Code Here

    public Address getAddress() {
        return address;
    }
    public void setAddress(Address address) {
        if (address.getPhonePrimary() == null) {
            address.setPhonePrimary(new PhoneImpl());
        }
        this.address = address;
    }
View Full Code Here

    protected Address address = new AddressImpl();
    protected boolean useShippingAddress;

    public BillingInfoForm() {
        address.setPhonePrimary(new PhoneImpl());
    }
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.profile.core.domain.PhoneImpl

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.