use of org.uberfire.java.nio.fs.file.SimpleFileSystemProvider in project kie-wb-common by kiegroup.
the class PackageNameWhiteListLoaderTest method setUp.
@Before
public void setUp() throws Exception {
final SimpleFileSystemProvider fs = new SimpleFileSystemProvider();
// Bootstrap WELD container
weld = new Weld();
final BeanManager beanManager = weld.initialize().getBeanManager();
// Instantiate Paths used in tests for Path conversion
final Bean pathsBean = (Bean) beanManager.getBeans(Paths.class).iterator().next();
final CreationalContext cc = beanManager.createCreationalContext(pathsBean);
Paths paths = (Paths) beanManager.getReference(pathsBean, Paths.class, cc);
// Ensure URLs use the default:// scheme
fs.forceAsDefault();
tempFiles = new TempFiles();
final File tempFile = tempFiles.createTempFile("white-list");
final org.uberfire.java.nio.file.Path nioPackagePath = fs.getPath(tempFile.toURI());
pathToWhiteList = paths.convert(nioPackagePath);
loader = new PackageNameWhiteListLoader(packageNameSearchProvider, ioService);
}
Aggregations