Skip to content

Instantly share code, notes, and snippets.

Last active May 28, 2018 06:05
What would you like to do?
val input: Seq[RawListing] = //... fixture
def transform(in: RawListing): FullListing = //... trivial
var savedResult: String = null
def save(json: String): Async[Unit] = Async {
  insertResultHere = json
val expectedResult = //... actually generate some sort of JSON

val processor = new ListingProcessor(transform, save)
//... resolve asynchrony

assertEquals(expectedResult, savedResult) // Or regex acrobatics, etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment