CndImporter { public void importBuiltIns( Problems problems ) throws IOException { for (String resource : BUILT_INS) { InputStream stream = ResourceLookup.read(resource, getClass(), true); importFrom(stream, problems, resource); } } CndImporter( ExecutionContext context ); void importFrom( InputStream stream,
                            Problems problems,
                            String resourceName ); void importFrom( File file,
                            Problems problems ); void importFrom( String content,
                            Problems problems,
                            String resourceName ); void importBuiltIns( Problems problems ); Set<NamespaceRegistry.Namespace> getNamespaces(); List<NodeTypeDefinition> getNodeTypeDefinitions(); static final boolean DEFAULT_USE_VENDOR_EXTENSIONS; static final boolean DEFAULT_COMPATIBLE_WITH_PREJCR2; }
@Test public void shouldImportBuiltInNodeTypes() throws Exception { importer.importBuiltIns(problems); if (problems.size() != 0) printProblems(); assertThat(problems.size(), is(0)); registerImportedNamespaces(); assertNodeType("nt:base", new String[] {}, NO_PRIMARY_NAME, NodeOptions.Abstract, NodeOptions.Queryable); assertNodeType("mode:root", new String[] {"nt:base", "mix:referenceable"}, NO_PRIMARY_NAME, NodeOptions.Queryable, NodeOptions.Ordered); }