Skip to content

Instantly share code, notes, and snippets.

@ieure
Created July 11, 2012 22:34
Show Gist options
  • Save ieure/3094194 to your computer and use it in GitHub Desktop.
Save ieure/3094194 to your computer and use it in GitHub Desktop.
/**
* © 2012 Simple Finance Technology Corp. All rights reserved.
* Author: Ian Eure <ieure@simple.com>
*/
package com.simple.zatoichi
import com.simple.simplespec.Spec
import org.junit.Test
import com.sun.xml.internal.ws.client.ClientTransportException
import com.simple.zatoichi.instruments.{
BancorpIDVUploadInstrument,
BancorpStatusCheckInstrument,
BancorpFundAchInstrument,
BancorpFundCreditCardInstrument,
BancorpApplicationSubmissionInstrument}
import com.simple.serviceutil.threading.{WithTimeout, TimeoutException}
class TakeABigStepBackSpec extends Spec {
class LiterallyFuck {
@Test def yourOwnFace {
val oldF = BancorpApplicationSubmissionInstrument.errorMeter.count
evaluating {
BancorpApplicationSubmissionInstrument {
WithTimeout.awaitOrThrow(900, {
throw new ClientTransportException(new Exception)
})
}
}.must(throwA[ClientTransportException])
val newF = BancorpApplicationSubmissionInstrument.errorMeter.count
newF.must(be(oldF + 1))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment