We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f64e84 commit 5381250Copy full SHA for 5381250
1 file changed
app/test/processing/app/MessagesTest.kt
@@ -3,12 +3,19 @@ package processing.app
3
import org.junit.jupiter.api.Assertions.*
4
import org.junit.jupiter.api.Test
5
import org.mockito.Mockito.*
6
+import java.io.*
7
8
class MessagesTest {
9
@Test
10
fun showMessage() {
11
// Mock output state; instead of output to terminal -> output to a data stream (byte array)
12
+ val streamOut = ByteArrayOutputStream()
13
+ System.setOut(PrintStream(streamOut))
14
15
+ Messages.showMessage("TestTile: ", "Hello World!")
16
+ val testOutput
17
+
18
+ assertEquals()
19
}
20
21
0 commit comments