public class PolicyTest extends Object
Constructor and Description |
---|
PolicyTest() |
Modifier and Type | Method and Description |
---|---|
void |
testCannotCreateStatementWithBothResourceAndNotResource()
Tests that constructing a Statement with a Resource and a NotResource element will fail
|
void |
testCannotSerializeStatementWithBothResourceAndNotResource()
Tests that serializing a Statement with a Resource and a NotResource element will fail
|
void |
testMultipleConditionKeysForConditionType()
Policies with multiple conditions that use the same comparison type must
be merged together in the JSON format, otherwise there will be two keys
with the same name and one will override the other.
|
void |
testMultipleStatements()
Tests serializing a more complex policy object with multiple statements.
|
void |
testNotResourceElement()
Tests that a Statement including a Resource specified as a NotResource element is
serialized to JSON with a "NotResource" attribute
|
void |
testPolicyWithNoResources()
Tests that a Statement with an empty resources list results in no Resource element
|
void |
testPrincipalAccountId() |
void |
testPrincipals() |
void |
testStatementIdAssignment()
Tests that a policy correctly assigns unique statement IDs to any added
statements without IDs yet.
|
public void testPrincipals()
public void testMultipleConditionKeysForConditionType() throws Exception
Exception
public void testMultipleStatements() throws Exception
Exception
public void testStatementIdAssignment() throws Exception
Exception
public void testNotResourceElement()
public void testPolicyWithNoResources()
public void testCannotCreateStatementWithBothResourceAndNotResource()
public void testCannotSerializeStatementWithBothResourceAndNotResource()
public void testPrincipalAccountId()
Copyright © 2021. All rights reserved.