From 2a29930c8677b75b9c99a9cd5339f0b8009e72f4 Mon Sep 17 00:00:00 2001 From: George Fraser Date: Wed, 9 Jan 2019 00:07:25 -0800 Subject: Reader access flags directly from class file --- src/test/java/org/javacs/ClassesTest.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/test/java/org/javacs/ClassesTest.java') diff --git a/src/test/java/org/javacs/ClassesTest.java b/src/test/java/org/javacs/ClassesTest.java index 95212fe..c5e2a7e 100644 --- a/src/test/java/org/javacs/ClassesTest.java +++ b/src/test/java/org/javacs/ClassesTest.java @@ -16,18 +16,16 @@ public class ClassesTest { @Test public void list() { var jdk = Classes.jdkTopLevelClasses(); - assertThat(jdk.classes(), hasItem("java.util.List")); - assertThat(jdk.load("java.util.List"), not(nullValue())); + assertThat(jdk, hasItem("java.util.List")); var empty = Classes.classPathTopLevelClasses(Collections.emptySet()); - assertThat(empty.classes(), not(hasItem("java.util.List"))); + assertThat(empty, not(hasItem("java.util.List"))); } @Test public void arrayList() { var jdk = Classes.jdkTopLevelClasses(); - assertThat(jdk.classes(), hasItem("java.util.ArrayList")); - assertThat(jdk.load("java.util.ArrayList"), not(nullValue())); + assertThat(jdk, hasItem("java.util.ArrayList")); } @Test @@ -46,9 +44,6 @@ public class ClassesTest { var main = found.stream().filter(c -> c.getName().equals("org.javacs.Main")).findFirst(); assertTrue(main.isPresent()); - - var load = main.get().load(); - assertNotNull(load); } void ancestors(ClassLoader classLoader) { -- cgit v1.2.3