public final void assertDefinedValue(String message) { assertSuccess(message); message = adjustAssertMessage(message); if (!hasDefinedValue()) { throw new AssertionError( message + "Expected defined 'result', but it's missing: " + this.asString()); } }
public final void assertNotDefinedValue(String message) { assertSuccess(message); message = adjustAssertMessage(message); if (this.hasDefined(Constants.RESULT)) { throw new AssertionError( message + "Expected NOT defined 'result', but it's present: " + this.asString()); } }
@Test public void addFull() throws Exception { AddSecurityRealm addSecurityRealm = new AddSecurityRealm.Builder(TEST_SECURITY_REALM_NAME).mapGroupsToRoles(true).build(); client.apply(addSecurityRealm); assertTrue("The security realm should be created", ops.exists(TEST_SECURITY_REALM_ADDRESS)); ModelNodeResult readAttribute = ops.readAttribute(TEST_SECURITY_REALM_ADDRESS, "map-groups-to-roles"); readAttribute.assertSuccess("Read operation for map-groups-to-roles failed"); Assert.assertEquals( "Read operation for map-groups-to-roles return wrong value", "true", readAttribute.stringValue()); }
public final void assertSuccess() { assertSuccess(null); }