Package org.broadleafcommerce.test
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.catalog.service.CatalogServiceprotected org.broadleafcommerce.profile.core.service.CountryServiceprotected org.broadleafcommerce.profile.core.service.CustomerAddressServiceprotected org.broadleafcommerce.profile.core.service.CustomerServiceprotected org.broadleafcommerce.common.i18n.service.ISOServiceprotected org.broadleafcommerce.core.order.service.OrderServiceFields inherited from class org.broadleafcommerce.test.TestNGSiteIntegrationSetup
LOGFields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
applicationContext, logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.broadleafcommerce.core.catalog.domain.ProductaddTestProduct(String productName, String categoryName) org.broadleafcommerce.core.catalog.domain.ProductaddTestProduct(String productName, String categoryName, boolean active) voidorg.broadleafcommerce.profile.core.domain.Customerorg.broadleafcommerce.profile.core.domain.CustomerAddresscreateCustomerWithAddress(org.broadleafcommerce.profile.core.domain.CustomerAddress customerAddress) Creates a country, state, and customer with the supplied customerAddressorg.broadleafcommerce.profile.core.domain.CustomerCreates a country, state, and customer with some CustomerAddressesorg.broadleafcommerce.profile.core.domain.CustomerCreate a state, country, and customer with a basic order and some addressesorg.broadleafcommerce.profile.core.domain.CustomerAddresssaveCustomerAddress(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, reSetApplicationContextMethods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
-
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 org.broadleafcommerce.core.catalog.service.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
-
addTestProduct
-