uk.co.jemos.podam.test.unit
Class PodamMockerUnitTest

java.lang.Object
  extended by uk.co.jemos.podam.test.unit.PodamMockerUnitTest

public class PodamMockerUnitTest
extends Object

Unit test for simple App.


Constructor Summary
PodamMockerUnitTest()
           
 
Method Summary
private  void checkCalendarIsValid(Calendar calendarField)
          It checks that the Calendar instance is valid
 void testByteValueAnnotation()
           
 void testCharacterValueAnnotation()
           
 void testCollectionAnnotation()
           
 void testCollectionsPojo()
           
 void testDoubleValueAnnotation()
           
 void testFloatValueAnnotation()
           
 void testImmutableNoHierarchicalAnnotatedPojo()
           
 void testImmutableNonAnnotatedPojo()
           
 void testImmutablePojoWithGenerifiedCollectionsInConstructor()
           
 void testImmutablePojoWithNonGenericCollections()
           
 void testImmutablePojoWithSelfReferencesInConstructor()
           
 void testInheritance()
           
 void testIntegerValueAnnotation()
           
 void testLongPojoWithRangeValues()
           
 void testMockerForAbstractClass()
           
 void testMockerForClassWithoutDefaultConstructor()
           
 void testMockerForInterface()
           
 void testMockerForPojoWithPrivateNoArgConstructor()
           
 void testMockerForPrimitiveType()
           
 void testOneDimensionalTestPojo()
           
 void testPodamExcludeAnnotation()
           
 void testPojoWithNoSettersAndCollectionInConstructor()
           
 void testRecursiveHierarchyPojo()
           
 void testShortValueAnnotation()
           
 void testSingletonWithParametersInPublicStaticMethod()
           
 void testStringValueAnnotation()
           
private  void validateConcurrentHashMap(ConcurrentMap<String,OneDimensionalTestPojo> map)
          It validates the concurrent hash map returned by podam
private  void validateHashMap(Map<String,OneDimensionalTestPojo> map)
          It validates the HashMap returned by Podam
private  void validateMapElement(Map<String,OneDimensionalTestPojo> map, Set<String> keySet)
          It validates a map element
private  void validateReturnedList(List<String> list)
          It validates that the returned list contains the expected values
private  void validateReturnedSet(Set<String> set)
          It validates that the returned list contains the expected values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PodamMockerUnitTest

public PodamMockerUnitTest()
Method Detail

testMockerForClassWithoutDefaultConstructor

public void testMockerForClassWithoutDefaultConstructor()

testMockerForAbstractClass

public void testMockerForAbstractClass()

testMockerForInterface

public void testMockerForInterface()

testMockerForPrimitiveType

public void testMockerForPrimitiveType()

testMockerForPojoWithPrivateNoArgConstructor

public void testMockerForPojoWithPrivateNoArgConstructor()

testOneDimensionalTestPojo

public void testOneDimensionalTestPojo()

testRecursiveHierarchyPojo

public void testRecursiveHierarchyPojo()

testImmutableNoHierarchicalAnnotatedPojo

public void testImmutableNoHierarchicalAnnotatedPojo()

testImmutableNonAnnotatedPojo

public void testImmutableNonAnnotatedPojo()

testImmutablePojoWithSelfReferencesInConstructor

public void testImmutablePojoWithSelfReferencesInConstructor()

testPodamExcludeAnnotation

public void testPodamExcludeAnnotation()

testIntegerValueAnnotation

public void testIntegerValueAnnotation()

testLongPojoWithRangeValues

public void testLongPojoWithRangeValues()

testInheritance

public void testInheritance()

testCollectionsPojo

public void testCollectionsPojo()

testPojoWithNoSettersAndCollectionInConstructor

public void testPojoWithNoSettersAndCollectionInConstructor()

testByteValueAnnotation

public void testByteValueAnnotation()

testShortValueAnnotation

public void testShortValueAnnotation()

testCharacterValueAnnotation

public void testCharacterValueAnnotation()

testFloatValueAnnotation

public void testFloatValueAnnotation()

testDoubleValueAnnotation

public void testDoubleValueAnnotation()

testStringValueAnnotation

public void testStringValueAnnotation()

testCollectionAnnotation

public void testCollectionAnnotation()

testImmutablePojoWithNonGenericCollections

public void testImmutablePojoWithNonGenericCollections()

testImmutablePojoWithGenerifiedCollectionsInConstructor

public void testImmutablePojoWithGenerifiedCollectionsInConstructor()

testSingletonWithParametersInPublicStaticMethod

public void testSingletonWithParametersInPublicStaticMethod()

checkCalendarIsValid

private void checkCalendarIsValid(Calendar calendarField)
It checks that the Calendar instance is valid

If the calendar returns a valid date then it's a valid instance

Parameters:
calendarField - The calendar instance to check

validateReturnedList

private void validateReturnedList(List<String> list)
It validates that the returned list contains the expected values

Parameters:
list - The list to verify

validateReturnedSet

private void validateReturnedSet(Set<String> set)
It validates that the returned list contains the expected values

Parameters:
set - The set to verify

validateHashMap

private void validateHashMap(Map<String,OneDimensionalTestPojo> map)
It validates the HashMap returned by Podam

Parameters:
map - the map to be validated

validateConcurrentHashMap

private void validateConcurrentHashMap(ConcurrentMap<String,OneDimensionalTestPojo> map)
It validates the concurrent hash map returned by podam

Parameters:
map -

validateMapElement

private void validateMapElement(Map<String,OneDimensionalTestPojo> map,
                                Set<String> keySet)
It validates a map element

Parameters:
map - The Map to validate
keySet - The Set of keys in the map

Jemos 2002 - 2011: All Rights Reserved. Podam runs under the MIT license

Copyright © 2011. All Rights Reserved.