Skip to content

Commit 74d2250

Browse files
committed
Additional tests
1 parent 3cdb392 commit 74d2250

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

acp/src/test/java/com/inrupt/client/acp/AccessControlResourceTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ void expandAcr4Async() {
359359
void testMerge() {
360360
final var identifier = "https://data.example/resource";
361361
final var agent = URI.create("https://id.example/agent");
362-
final var client = URI.create("https://app.example/id");
362+
final var app = URI.create("https://app.example/id");
363363

364364
final var acr = new AccessControlResource(URI.create(identifier), rdf.createDataset());
365-
final var policy = acr.merge(Set.of(ACL.Read, ACL.Write), acr.agentPolicy(agent), acr.clientPolicy(client));
365+
final var policy = acr.merge(Set.of(ACL.Read, ACL.Write), acr.agentPolicy(agent), acr.clientPolicy(app));
366366

367367
assertEquals(2, policy.allow().size());
368368
assertTrue(policy.allow().contains(ACL.Read));
@@ -371,5 +371,8 @@ void testMerge() {
371371
assertEquals(2, policy.allOf().size());
372372
assertEquals(0, policy.anyOf().size());
373373
assertEquals(0, policy.noneOf().size());
374+
375+
assertTrue(policy.allOf().stream().anyMatch(matcher -> matcher.client().contains(app)));
376+
assertTrue(policy.allOf().stream().anyMatch(matcher -> matcher.agent().contains(agent)));
374377
}
375378
}

0 commit comments

Comments
 (0)