1515import static org .junit .jupiter .api .Assertions .assertEquals ;
1616import static org .junit .jupiter .api .Assertions .assertTrue ;
1717
18- import java .io .ByteArrayInputStream ;
1918import java .io .File ;
2019import java .io .IOException ;
2120import java .nio .file .FileVisitResult ;
@@ -63,7 +62,7 @@ public void setUpProject() throws Exception {
6362 @ Test
6463 public void testCSSFile () throws Exception {
6564 final IFile file = project .getFile ("blah.css" );
66- file .create (new ByteArrayInputStream ( "ERROR" .getBytes ()) , true , null );
65+ file .create ("ERROR" .getBytes (), true , false , null );
6766 ITextEditor editor = (ITextEditor ) IDE
6867 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
6968 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("FAIL" );
@@ -79,7 +78,7 @@ public void testCSSFile() throws Exception {
7978 @ Test
8079 public void testHTMLFile () throws Exception {
8180 final IFile file = project .getFile ("blah.html" );
82- file .create (new ByteArrayInputStream ( "FAIL" .getBytes ()) , true , null );
81+ file .create ("FAIL" .getBytes (), true , false , null );
8382 ITextEditor editor = (ITextEditor ) IDE
8483 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
8584 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("<style\n <html><" );
@@ -95,7 +94,7 @@ public void testHTMLFile() throws Exception {
9594 @ Test
9695 public void testYAMLFile () throws Exception {
9796 final IFile file = project .getFile ("blah.yaml" );
98- file .create (new ByteArrayInputStream ( "FAIL" .getBytes ()) , true , null );
97+ file .create ("FAIL" .getBytes (), true , false , null );
9998 ITextEditor editor = (ITextEditor ) IDE
10099 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
101100 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("hello: '" );
@@ -111,7 +110,7 @@ public void testYAMLFile() throws Exception {
111110 @ Test
112111 public void testJSONFile () throws Exception {
113112 final IFile file = project .getFile ("blah.json" );
114- file .create (new ByteArrayInputStream ( "FAIL" .getBytes ()) , true , null );
113+ file .create ("FAIL" .getBytes (), true , false , null );
115114 ITextEditor editor = (ITextEditor ) IDE
116115 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
117116 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("ERROR" );
@@ -127,7 +126,7 @@ public void testJSONFile() throws Exception {
127126 @ Test
128127 public void testJSFile () throws Exception {
129128 final IFile file = project .getFile ("blah.js" );
130- file .create (new ByteArrayInputStream ( "ERROR" .getBytes ()) , true , null );
129+ file .create ("ERROR" .getBytes (), true , false , null );
131130 ITextEditor editor = (ITextEditor ) IDE
132131 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
133132 DisplayHelper .sleep (2000 ); // Give time for LS to initialize enough before making edit and sending a
@@ -145,7 +144,7 @@ public void testJSFile() throws Exception {
145144 @ Test
146145 public void testTSFile () throws Exception {
147146 final IFile file = project .getFile ("blah.ts" );
148- file .create (new ByteArrayInputStream ( "ERROR" .getBytes ()) , true , null );
147+ file .create ("ERROR" .getBytes (), true , false , null );
149148 ITextEditor editor = (ITextEditor ) IDE
150149 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
151150 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("FAIL" );
@@ -161,7 +160,7 @@ public void testTSFile() throws Exception {
161160 @ Test
162161 public void testJSXFile () throws Exception {
163162 final IFile file = project .getFile ("blah.jsx" );
164- file .create (new ByteArrayInputStream ( "ERROR" .getBytes ()) , true , null );
163+ file .create ("ERROR" .getBytes (), true , false , null );
165164 ITextEditor editor = (ITextEditor ) IDE
166165 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
167166 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("a<" );
@@ -177,7 +176,7 @@ public void testJSXFile() throws Exception {
177176 @ Test
178177 public void testTSXFile () throws Exception {
179178 final IFile file = project .getFile ("blah.tsx" );
180- file .create (new ByteArrayInputStream ( "ERROR" .getBytes ()) , true , null );
179+ file .create ("ERROR" .getBytes (), true , false , null );
181180 ITextEditor editor = (ITextEditor ) IDE
182181 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
183182 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("FAIL" );
@@ -272,7 +271,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
272271 @ Test
273272 public void testSCSSFile () throws Exception {
274273 final IFile file = project .getFile ("blah.scss" );
275- file .create (new ByteArrayInputStream ( "ERROR" .getBytes ()) , true , null );
274+ file .create ("ERROR" .getBytes (), true , false , null );
276275 ITextEditor editor = (ITextEditor ) IDE
277276 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
278277 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("FAIL" );
@@ -288,7 +287,7 @@ public void testSCSSFile() throws Exception {
288287 @ Test
289288 public void testLESSFile () throws Exception {
290289 final IFile file = project .getFile ("blah.less" );
291- file .create (new ByteArrayInputStream ( "ERROR" .getBytes ()) , true , null );
290+ file .create ("ERROR" .getBytes (), true , false , null );
292291 ITextEditor editor = (ITextEditor ) IDE
293292 .openEditor (PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), file );
294293 editor .getDocumentProvider ().getDocument (editor .getEditorInput ()).set ("FAIL" );
0 commit comments