mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-29 01:04:29 +00:00
Service lookups answer from an index the catalog builds once per type instead of filtering every registration per call; a type's @Service annotation is read once
This commit is contained in:
1 parent
d7de5939d7
commit
b39c750e26
3 files changed
+56
-20
No files matched your search
@@ -395,6 +395,11 @@ class ModuleRegistryTest {
|
||||
var several = assertThrows(IllegalArgumentException.class, () -> catalog.service(Greeting.class));
|
||||
assertTrue(several.getMessage().contains("services(...)"), several.getMessage());
|
||||
assertThrows(IllegalArgumentException.class, () -> catalog.services(NotAService.class));
|
||||
assertThrows(IllegalArgumentException.class, () -> catalog.registrations(NotAService.class), "asking again still refuses it");
|
||||
assertEquals(List.of(alphaFirst, alphaSecond, zeta),
|
||||
catalog.registrations(Greeting.class).stream().map(ServiceRegistration::provider).toList());
|
||||
assertEquals(List.of(), catalog.registrations(Clock.class));
|
||||
assertThrows(UnsupportedOperationException.class, () -> catalog.services(Greeting.class).clear(), "the catalog is frozen");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user