1 20 21 package org.netbeans.test.editor.app.tests; 22 import java.io.PrintWriter ; 23 import org.openide.filesystems.*; 24 import org.netbeans.junit.NbTestCase; 25 import org.netbeans.junit.NbTestSuite; 26 import java.io.File ; 27 import org.netbeans.test.editor.LineDiff; 28 29 30 35 36 public class AbbreviationsPerformer extends NbTestCase { 37 public AbbreviationsPerformer(String name) { 38 super(name); 39 } 40 public void tearDown() throws Exception { 41 assertFile("Output does not match golden file.", getGoldenFile(), new File (getWorkDir(), this.getName() + ".ref"), new File (getWorkDir(), this.getName() + ".diff"), new LineDiff(false)); 42 } 43 44 51 52 public void testInvokeAll() throws Exception { 53 PrintWriter ref = null; 54 PrintWriter log = null; 55 String [] arguments = new String [] { 56 "/org/netbeans/test/editor/app/tests/abbrevs.xml", 57 "BasicTests.InvokeAll" 58 }; 59 try { 60 ref = new PrintWriter (getRef()); 61 log = new PrintWriter (getLog()); 62 new CallTestGeneric().runTest(arguments, log, ref); 63 } finally { 64 if (ref != null) ref.flush(); 65 if (log != null) log.flush(); 66 } 67 } 68 69 76 77 public void testIndentAbbrevs() throws Exception { 78 PrintWriter ref = null; 79 PrintWriter log = null; 80 String [] arguments = new String [] { 81 "/org/netbeans/test/editor/app/tests/abbrevs.xml", 82 "BasicTests.IndentAbbrevs" 83 }; 84 try { 85 ref = new PrintWriter (getRef()); 86 log = new PrintWriter (getLog()); 87 new CallTestGeneric().runTest(arguments, log, ref); 88 } finally { 89 if (ref != null) ref.flush(); 90 if (log != null) log.flush(); 91 } 92 } 93 94 101 102 public void testCursor() throws Exception { 103 PrintWriter ref = null; 104 PrintWriter log = null; 105 String [] arguments = new String [] { 106 "/org/netbeans/test/editor/app/tests/abbrevs.xml", 107 "BasicTests.Cursor" 108 }; 109 try { 110 ref = new PrintWriter (getRef()); 111 log = new PrintWriter (getLog()); 112 new CallTestGeneric().runTest(arguments, log, ref); 113 } finally { 114 if (ref != null) ref.flush(); 115 if (log != null) log.flush(); 116 } 117 } 118 } 119 | Popular Tags |