Spock Web Console

subscribe to the feed Subscribe
sum between two numbers -test (via #spockwebconsole)
tweet this script Tweet

sum between two numbers -test

Published 2 years ago by Vio
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

class SumSpec extends Specification {
    def "adding two numbers"(){
       given: "the integers four and six"
                 int a = 4
                 int b = 6
       when: "they are dded"
                 int res = a+b
       then: "the result is ten"
                 res == 10