com.parthparekh.service
Class ProductServiceTest

java.lang.Object
  extended by com.parthparekh.service.ProductServiceTest

@ContextConfiguration(locations="/META-INF/test-context.xml")
public class ProductServiceTest
extends java.lang.Object

Test ProductService functions


Field Summary
private  Cache cache
           
 org.junit.rules.ExpectedException exception
           
private static org.slf4j.Logger logger
           
protected  Product product
           
private  ProductService productService
           
private  TestUtils testUtils
           
 
Constructor Summary
ProductServiceTest()
           
 
Method Summary
 void cacheInvalidateTest()
           
 void createProductTest()
           
 void getAllTest()
           
 void getProductTest()
           
 void nullGetAllTest()
           
 void productNotFoundTest()
           
 void setUp()
           
 void updateProductTest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.slf4j.Logger logger

exception

public org.junit.rules.ExpectedException exception

productService

@Autowired
@Qualifier(value="cache")
private ProductService productService

cache

@Autowired
@Qualifier(value="defaultCache")
private Cache cache

testUtils

@Autowired
private TestUtils testUtils

product

protected Product product
Constructor Detail

ProductServiceTest

public ProductServiceTest()
Method Detail

setUp

public void setUp()
           throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

createProductTest

public void createProductTest()

updateProductTest

public void updateProductTest()

getProductTest

public void getProductTest()

productNotFoundTest

public void productNotFoundTest()

nullGetAllTest

public void nullGetAllTest()
                    throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

getAllTest

public void getAllTest()
                throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

cacheInvalidateTest

public void cacheInvalidateTest()
                         throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException