mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
This commit is contained in:
parent
9541a93b86
commit
fd31064433
@ -12,7 +12,7 @@ import org.junit.Test;
|
||||
public class MemJavaFileObjectTest {
|
||||
|
||||
@Test
|
||||
public void testOpenOutputStream() throws IOException {
|
||||
public void getCharContent() throws IOException {
|
||||
MemJavaFileObject obj = new MemJavaFileObject("mem","Test",Kind.SOURCE);
|
||||
Writer writer = obj.openWriter();
|
||||
writer.write("Hello World");
|
||||
@ -22,8 +22,9 @@ public class MemJavaFileObjectTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenInputStream() throws IOException {
|
||||
public void openInputStream() throws IOException {
|
||||
MemJavaFileObject obj = new MemJavaFileObject("mem","Test",Kind.SOURCE);
|
||||
obj.openWriter().write("test");
|
||||
obj.openInputStream().close();
|
||||
}
|
||||
|
||||
|
||||
@ -20,5 +20,12 @@ public class MemSourceFileObjectTest {
|
||||
obj.openWriter().write("Hello World");
|
||||
assertEquals("Hello World", obj.getCharContent(true).toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenWriter2() throws IOException {
|
||||
MemSourceFileObject obj = new MemSourceFileObject("Test");
|
||||
obj.openWriter().append("Hello World");
|
||||
assertEquals("Hello World", obj.getCharContent(true).toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user