Class ZybooksTester
Object
ZybooksTester
This class wraps various junit tests. By having it, we can write junit tests for
development, but when putting them as unit tests in Zybooks it will instead use
this file - as it can't use junit.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ByteArrayOutputStream
(package private) final PrintWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
assertContains
(String actual, String[] expected) boolean
assertEquals
(Object expected, Object actual) boolean
assertEquals
(Object expected, Object actual, String message) boolean
assertEquals
(Object expected, Object actual, String message, boolean strip) boolean
assertNull
(Object obj) boolean
assertNull
(Object obj, String message) void
private void
feedbackWriter
(String expected, String actual, String message) static String
readFileToString
(String fileName) void
setSystemIn
(String input)
-
Field Details
-
testFeedback
-
baos
-
-
Constructor Details
-
ZybooksTester
-
-
Method Details
-
controlOutput
public void controlOutput() -
getSystemOut
-
setSystemIn
-
assertContains
-
assertEquals
-
assertEquals
-
assertEquals
-
assertNull
-
assertNull
-
readFileToString
-
feedbackWriter
-