Reworked to Kotlin version of Cactoos
Kactoos intended to be used as drop-in replacement for Cactoos, this statement backed by compatibility tests
Write to file, read it contents, and compare it with original
val temp = Files.createTempFile("kactoos-1", "txt-1")
val identical = Equals(
{
TextOf(
TeeInput(
InputOf(
BytesOf(
TextOf("Hello, world!")
)
),
WriterAsOutput(
WriterTo(temp)
)
)
).asString()
},
{ "Hello, world!" }
).invoke()
Target platforms other than jvm, specifically kotlin-js and kotlin-native
- Do no use @JvmOverloads and default arguments in functions and constructors as it's not portable