Spock Web Console

subscribe to the feed Subscribe
Multi notThrown (via #spockwebconsole)
tweet this script Tweet

Multi notThrown

Published 4 years ago by Gareth with tags notthrown
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

// Hit 'Run Script' below
class MyFirstSpec extends Specification {
  def "let's try this!"() {
    Math.max(1, 2) == 3
    notThrown exception
    exception << [NullPointerException, NumberFormatException, AssertionError]