Class CommonSetupBaseTest

java.lang.Object
org.springframework.test.context.testng.AbstractTestNGSpringContextTests
org.broadleafcommerce.test.TestNGSiteIntegrationSetup
org.broadleafcommerce.test.CommonSetupBaseTest
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.testng.IHookable, org.testng.ITestNGListener
Direct Known Subclasses:
AddressTest, CustomerAddressTest, FulfillmentGroupDaoTest, FutureCreditOfferTest, OfferAuditTest, OfferServiceTest, OfferTest, OrderBaseTest

public abstract class CommonSetupBaseTest extends TestNGSiteIntegrationSetup
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected CatalogService
     
    protected org.broadleafcommerce.profile.core.service.CountryService
     
    protected org.broadleafcommerce.profile.core.service.CustomerAddressService
     
    protected org.broadleafcommerce.profile.core.service.CustomerService
     
    protected org.broadleafcommerce.common.i18n.service.ISOService
     
    protected org.broadleafcommerce.core.order.service.OrderService
     

    Fields inherited from class org.broadleafcommerce.test.TestNGSiteIntegrationSetup

    LOG

    Fields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests

    applicationContext, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addTestProduct(String productName, String categoryName)
     
    addTestProduct(String productName, String categoryName, boolean active)
     
    void
     
    org.broadleafcommerce.profile.core.domain.Customer
     
    org.broadleafcommerce.profile.core.domain.CustomerAddress
    createCustomerWithAddress(org.broadleafcommerce.profile.core.domain.CustomerAddress customerAddress)
    Creates a country, state, and customer with the supplied customerAddress
    org.broadleafcommerce.profile.core.domain.Customer
    Creates a country, state, and customer with some CustomerAddresses
    org.broadleafcommerce.profile.core.domain.Customer
    Create a state, country, and customer with a basic order and some addresses
    org.broadleafcommerce.profile.core.domain.CustomerAddress
    saveCustomerAddress(org.broadleafcommerce.profile.core.domain.CustomerAddress customerAddress)
    Saves a customerAddress with state KY and country US.

    Methods inherited from class org.broadleafcommerce.test.TestNGSiteIntegrationSetup

    logStart, logWhenDone, reSetApplicationContext

    Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests

    run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • isoService

      protected org.broadleafcommerce.common.i18n.service.ISOService isoService
    • countryService

      protected org.broadleafcommerce.profile.core.service.CountryService countryService
    • customerService

      protected org.broadleafcommerce.profile.core.service.CustomerService customerService
    • customerAddressService

      protected org.broadleafcommerce.profile.core.service.CustomerAddressService customerAddressService
    • catalogService

      protected CatalogService catalogService
    • orderService

      protected org.broadleafcommerce.core.order.service.OrderService orderService
  • Constructor Details

    • CommonSetupBaseTest

      public CommonSetupBaseTest()
  • Method Details

    • createCountry

      public void createCountry()
    • createCustomer

      public org.broadleafcommerce.profile.core.domain.Customer createCustomer()
    • createCustomerWithAddresses

      public org.broadleafcommerce.profile.core.domain.Customer createCustomerWithAddresses()
      Creates a country, state, and customer with some CustomerAddresses
      Returns:
      customer created
    • createCustomerWithAddress

      public org.broadleafcommerce.profile.core.domain.CustomerAddress createCustomerWithAddress(org.broadleafcommerce.profile.core.domain.CustomerAddress customerAddress)
      Creates a country, state, and customer with the supplied customerAddress
      Parameters:
      customerAddress -
      Returns:
      customer created
    • saveCustomerAddress

      public org.broadleafcommerce.profile.core.domain.CustomerAddress saveCustomerAddress(org.broadleafcommerce.profile.core.domain.CustomerAddress customerAddress)
      Saves a customerAddress with state KY and country US. Requires that createCountry() and createState() have been called
      Parameters:
      customerAddress -
    • createCustomerWithBasicOrderAndAddresses

      public org.broadleafcommerce.profile.core.domain.Customer createCustomerWithBasicOrderAndAddresses()
      Create a state, country, and customer with a basic order and some addresses
    • addTestProduct

      public Product addTestProduct(String productName, String categoryName)
    • addTestProduct

      public Product addTestProduct(String productName, String categoryName, boolean active)