/** Test the default Constructor. */ @Test public void testDefaultConstructor() { final CommonEntityFields local = new CommonEntityFields(); Assert.assertNull(local.getName()); Assert.assertNull(local.getUser()); Assert.assertNull(local.getVersion()); }
/** Test to make sure the user is being set properly. */ @Test public void testSetUser() { final CommonEntityFields local = new CommonEntityFields(); Assert.assertNull(local.getUser()); local.setUser(USER); Assert.assertEquals(USER, local.getUser()); }
/** Test to make sure the version is being set properly. */ @Test public void testSetVersion() { final CommonEntityFields local = new CommonEntityFields(); Assert.assertNull(local.getVersion()); local.setVersion(VERSION); Assert.assertEquals(VERSION, local.getVersion()); }
/** Test to make sure the name is being set properly. */ @Test public void testSetName() { final CommonEntityFields local = new CommonEntityFields(); Assert.assertNull(local.getName()); local.setName(NAME); Assert.assertEquals(NAME, local.getName()); }
/** {@inheritDoc} */ @Override public void validate() throws GeniePreconditionException { String error = null; try { super.validate(); } catch (final GeniePreconditionException ge) { error = ge.getMessage(); } this.validate(this.status, this.clusterType, error); }