@Then("^policy evaluation response includes subject attribute (.*) with the value (.*)$")
public void policyEvaluationReturns(final String attributeName, final String attributeValue) throws Throwable {
Assert.assertEquals(this.policyEvaluationResponse.getStatusCode(), HttpStatus.OK);
Set<Attribute> subjectAttributes = new HashSet<Attribute>(
this.policyEvaluationResponse.getBody().getSubjectAttributes());
Assert.assertTrue(
subjectAttributes.contains(new Attribute(DEFAULT_ATTRIBUTE_ISSUER, attributeName, attributeValue)),
String.format("Subject Attributes expected to include attribute = (%s, %s, %s)",
DEFAULT_ATTRIBUTE_ISSUER, attributeName, attributeValue));
}
PolicyEvaluationStepsDefinitions.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:keti
作者:
评论列表
文章目录