Package com.magento.api

Examples of com.magento.api.CustomerCustomerEntityToCreate


  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("listCustomerAddresses");
     
      CustomerCustomerEntityToCreate customer = (CustomerCustomerEntityToCreate) testObjects.get("customerRef");
      int customerId = createCustomer(customer);
     
      testObjects.put("customerId", customerId);
     
      List<Integer> addressIds = new ArrayList<Integer>();
View Full Code Here


  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("updateCustomer");
     
      CustomerCustomerEntityToCreate customerBefore = (CustomerCustomerEntityToCreate) testObjects.get("customerBefore");
      int customerId = createCustomer(customerBefore);
     
      testObjects.put("customerId", customerId);
    }
    catch (Exception e) {
View Full Code Here

 
  @Category({ RegressionTests.class })
  @Test
  public void testUpdateCustomer() {
    try {
      CustomerCustomerEntityToCreate customerAfter = (CustomerCustomerEntityToCreate) testObjects.get("customerAfter");
     
      testObjects.put("customerRef", customerAfter);
     
      MessageProcessor flow = lookupFlowConstruct("update-customer");
      MuleEvent response = flow.process(getTestEvent(testObjects));
View Full Code Here

        final String email = "johndoe@mycia.com";
        final String firstname = "John";
        final String lastname = "Doe";
        assertEquals(0, countCustomers(email, firstname, lastname));

        CustomerCustomerEntityToCreate customer = new CustomerCustomerEntityToCreate();
        customer.setEmail(email);
        customer.setFirstname(firstname);
        customer.setLastname(lastname);
        customer.setPassword("123456");
        customer.setGroup_id(1);
       
        int customerId = connector.createCustomer(customer);
        try
        {
            assertEquals(1, countCustomers(email, firstname, lastname));
View Full Code Here

        final String email = "johndoe@mycia.com";
        final String firstname = "John";
        final String lastname = "Doe";
        assertEquals(0, countCustomers(email, firstname, lastname));

        CustomerCustomerEntityToCreate customer = new CustomerCustomerEntityToCreate();
        customer.setEmail(email);
        customer.setFirstname(firstname);
        customer.setLastname(lastname);
        customer.setPassword("123456");
        customer.setGroup_id(1);

        int customerId = connector.createCustomer(customer);
        try
        {
            customer.setFirstname("Tom");
            connector.updateCustomer(customer.getCustomer_id(), customer);
            assertEquals("Tom",
                connector.getCustomer(customerId, Arrays.asList("firstname")).getFirstname());
        }
        finally
        {
View Full Code Here

  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("getCustomerAddress");
     
      CustomerCustomerEntityToCreate customer = (CustomerCustomerEntityToCreate) testObjects.get("customerRef");
      int customerId = createCustomer(customer);
     
      testObjects.put("customerId", customerId);
     
      CustomerAddressEntityCreate address = (CustomerAddressEntityCreate) testObjects.get("customerAddressRef");
View Full Code Here

  @Test
  public void testGetCustomer() {
    try {
     
      int customerId = (Integer) testObjects.get("customerId");
      CustomerCustomerEntityToCreate customer = (CustomerCustomerEntityToCreate) testObjects.get("customerRef");

      MessageProcessor flow = lookupFlowConstruct("get-customer");
      MuleEvent response = flow.process(getTestEvent(testObjects));
     
      CustomerCustomerEntity createdCustomer = (CustomerCustomerEntity) response.getMessage().getPayload();

      assertTrue(createdCustomer.getCustomer_id() == customerId);
      assertTrue(createdCustomer.getEmail().equals(customer.getEmail()));
      assertTrue(createdCustomer.getFirstname().equals(customer.getFirstname()));
      assertTrue(createdCustomer.getLastname().equals(customer.getLastname()));
    }
    catch (Exception e) {
      e.printStackTrace();
      fail();
    }
View Full Code Here

  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("createCustomerAddress");
     
      CustomerCustomerEntityToCreate customer = (CustomerCustomerEntityToCreate) testObjects.get("customerRef");
      int customerId = createCustomer(customer);
     
      testObjects.put("customerId", customerId);
    }
    catch (Exception e) {
View Full Code Here

  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("deleteCustomerAddress");
     
      CustomerCustomerEntityToCreate customer = (CustomerCustomerEntityToCreate) testObjects.get("customerRef");
      int customerId = createCustomer(customer);
     
      testObjects.put("customerId", customerId);
     
      CustomerAddressEntityCreate address = (CustomerAddressEntityCreate) testObjects.get("customerAddressRef");
View Full Code Here

  @Before
  public void setUp() {
    try {
      testObjects = (HashMap<String, Object>) context.getBean("updateCustomerAddress");
     
      CustomerCustomerEntityToCreate customer = (CustomerCustomerEntityToCreate) testObjects.get("customerRef");
      int customerId = createCustomer(customer);
         
      testObjects.put("customerId", customerId);
   
      CustomerAddressEntityCreate address = (CustomerAddressEntityCreate) testObjects.get("customerAddressBefore");
View Full Code Here

TOP

Related Classes of com.magento.api.CustomerCustomerEntityToCreate

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.