All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.baulsupp.oksocial.output.TestOutputHandler.kt Maven / Gradle / Ivy

The newest version!
package com.baulsupp.oksocial.output

class TestOutputHandler : OutputHandler {
  val responses: MutableList = mutableListOf()
  val failures: MutableList = mutableListOf()
  val stdout: MutableList = mutableListOf()

  override suspend fun showOutput(response: R) {
    responses.add(response)
  }

  override suspend fun showError(message: String?, e: Throwable?) {
    if (e != null) {
      failures.add(e)
    }
  }

  override fun info(message: String) {
    stdout.add(message)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy