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)
processor.processListings(input)
//... 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