/** 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"); }
/** This test tests that invalidfield is passed as a field for the setter */ @Test(expected = AssertionError.class) public void testPassInvalidToSettersPerson() { beanTester.testSetterForField("invalid"); }
/** * 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")); }
/** 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); }
/** * 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")); }