1 19 20 package org.netbeans.modules.html.editor.test; 21 22 import org.netbeans.api.html.lexer.HTMLTokenId; 23 import org.netbeans.api.lexer.Language; 24 import org.netbeans.editor.BaseDocument; 25 import org.netbeans.editor.BaseKit; 26 import org.netbeans.junit.MockServices; 27 import org.netbeans.junit.NbTestCase; 28 import org.netbeans.modules.editor.NbEditorDocument; 29 import org.netbeans.modules.editor.html.HTMLKit; 30 31 36 public class TestBase extends NbTestCase { 37 38 static { 39 MockServices.setServices(new Class [] {RepositoryImpl.class}); 40 } 41 42 private static final String PROP_MIME_TYPE = "mimeType"; 44 public TestBase(String name) { 45 super(name); 46 } 47 48 protected BaseDocument createDocument() { 49 NbEditorDocument doc = new NbEditorDocument(HTMLKit.class); 50 doc.putProperty(PROP_MIME_TYPE, BaseKit.getKit(HTMLKit.class).getContentType()); 51 doc.putProperty(Language.class, HTMLTokenId.language()); 53 return doc; 54 } 55 56 } 57 | Popular Tags |