Ejemplo n.º 1
0
 /** This test tests that invalidfield is passed as a field for the setter */
 @Test(expected = AssertionError.class)
 public void testPassInvalidToSettersPerson() {
   beanTester.testSetterForField("invalid");
 }
Ejemplo n.º 2
0
 /** This test tests that final fields cannot be set with a value in the setter */
 @Test(expected = AssertionError.class)
 public void testPassFinalFieldToSettersPerson() {
   beanTester.testSetterForField("count");
 }
Ejemplo n.º 3
0
 /**
  * This test tests if setters are present for specific fields in the class and the names are in
  * the proper format
  */
 @Test
 public void testIndividualSettersPerson() {
   assertTrue(beanTester.testSetterForField("name"));
 }
Ejemplo n.º 4
0
 /** This test tests that exception is thrown if null is passed as a field for the setter */
 @Test(expected = IllegalArgumentException.class)
 public void testPassNullToSettersPerson() {
   beanTester.testSetterForField(null);
 }
Ejemplo n.º 5
0
 /**
  * This test tests if setters are present for all fields in the class and the names are in the
  * proper format
  */
 @Test
 public void testAllSettersPerson() {
   assertTrue(beanTester.testSetters());
 }
Ejemplo n.º 6
0
 /** This test tests that if invalidfield is passed as a field for the getter */
 @Test(expected = AssertionError.class)
 public void testPassInvalidFieldToGettersAddress() {
   beanTester.testGetterForField("invalid");
 }
Ejemplo n.º 7
0
 /** This test tests that exception is thrown if null is passed as a field for the getter */
 @Test(expected = IllegalArgumentException.class)
 public void testPassNullToGettersAddress() {
   beanTester.testGetterForField(null);
 }
Ejemplo n.º 8
0
 /**
  * This test tests if setters are present for specific fields in the class and the names are in
  * the proper format
  */
 @Test
 public void testIndividualSettersAddress() {
   assertTrue(beanTester.testSetterForField("zipcode"));
 }
Ejemplo n.º 9
0
 /**
  * This test tests if setters are present for all fields in the class and the names are in the
  * proper format
  */
 @Test
 public void testSettersAddress() {
   assertTrue(beanTester.testSetters());
 }