use of com.goide.project.GoModuleLibrariesInitializer in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoPathLibraryTest method assertLibrary.
private void assertLibrary(@NotNull Collection<String> libUrls, String... exclusionUrls) {
UIUtil.dispatchAllInvocationEvents();
GoModuleLibrariesInitializer initializer = myModule.getComponent(GoModuleLibrariesInitializer.class);
ModuleRootManager model = ModuleRootManager.getInstance(myModule);
LibraryOrderEntry libraryOrderEntry = OrderEntryUtil.findLibraryOrderEntry(model, initializer.getLibraryName());
if (libUrls.isEmpty()) {
assertNull(libraryOrderEntry);
return;
}
LibraryEx library = (LibraryEx) libraryOrderEntry.getLibrary();
assertNotNull(library);
assertSameElements(Arrays.asList(library.getUrls(OrderRootType.CLASSES)), libUrls);
assertSameElements(library.getExcludedRootUrls(), exclusionUrls);
}
Aggregations