Methods Summary |
---|
protected void | setUp()
|
protected void | tearDown()
|
public void | testEmptyPolicyFactoryMethodReturnsConstantObjectOnNullArguments()
Policy tested = Policy.createEmptyPolicy(null, null);
Policy expected = Policy.createEmptyPolicy();
assertTrue("The createEmptyPolicy(String, String) factory method should return the same instance as createEmptyPolicy()", tested == expected);
|
public void | testEmptyPolicyFactoryMethodReturnsProperObjectOnNonNullArguments()
Policy tested = Policy.createEmptyPolicy("aaa", "bbb");
assertEquals("The name is not initialized as expected", tested.getName(), "aaa");
assertEquals("The ID is not initialized as expected", tested.getId(), "bbb");
|
public void | testEmptyPolicyReturnsTrueOnIsEmptyAndFalseOnIsNull()
Policy tested = Policy.createEmptyPolicy();
assertTrue("Empty policy must return 'true' on isEmpty() call", tested.isEmpty());
assertFalse("Empty policy must return 'false' on isNull() call", tested.isNull());
|
public void | testNullPolicyFactoryMethodReturnsConstantObjectOnNullArguments()
Policy tested = Policy.createNullPolicy(null, null);
Policy expected = Policy.createNullPolicy();
assertTrue("The createNullPolicy(String, String) factory method should return the same instance as createNullPolicy()", tested == expected);
|
public void | testNullPolicyFactoryMethodReturnsProperObjectOnNonNullArguments()
Policy tested = Policy.createNullPolicy("aaa", "bbb");
assertEquals("The name is not initialized as expected", tested.getName(), "aaa");
assertEquals("The ID is not initialized as expected", tested.getId(), "bbb");
|
public void | testNullPolicyReturnsFalseOnIsEmptyAndTrueOnIsNull()
Policy tested = Policy.createNullPolicy();
assertFalse("Null policy must return 'false' on isEmpty() call", tested.isEmpty());
assertTrue("Null policy must return 'true' on isNull() call", tested.isNull());
|