Skip to content

Commit 5381250

Browse files
Partial update
1 parent 6f64e84 commit 5381250

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

app/test/processing/app/MessagesTest.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ package processing.app
33
import org.junit.jupiter.api.Assertions.*
44
import org.junit.jupiter.api.Test
55
import org.mockito.Mockito.*
6+
import java.io.*
67

78
class MessagesTest {
89
@Test
910
fun showMessage() {
1011
// Mock output state; instead of output to terminal -> output to a data stream (byte array)
12+
val streamOut = ByteArrayOutputStream()
13+
System.setOut(PrintStream(streamOut))
1114

15+
Messages.showMessage("TestTile: ", "Hello World!")
16+
val testOutput
17+
18+
assertEquals()
1219
}
1320

1421
@Test

0 commit comments

Comments
 (0)