PolicyEvaluationStepsDefinitions.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:keti 作者:
@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));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号