Giter VIP home page Giter VIP logo

spock-javaone2014's Introduction

Spock JavaOne 2014 Code Samples

purpose

This is a series of comparisons of junit, groovy test cases, and spock presented by Ken Sipe

getting started

The code is provided using gradle. So after you clone the repo, just type:

> ./gradlew test

or

> gradlw.bat test

This will download the internet... I mean download and bootstrap gradle + all the dependencies for the project including spock.

setting up your IDE

The gradle build file is configured to setup either an eclipse or IDEA project. just type:

> ./gradlew idea

or

> ./gradlew eclipse	

I have only tested this on IDEA

reviewing failures at the cmd-line

If a gradle build has a failed test, there isn't much information provided on the cmd-line for what is going on. The information can be view from stdio if you use the -i switch with gradle such as:

> ./gradlew test -i

Demos

Basics

  1. power assert
  2. simple calc
  3. old
  4. with
  5. requires java8 5 fast slow
  6. hamcrest
  7. data driven with unroll

mocking

  1. publisher

  2. warehouse

    basics regex returning

  3. spying

  4. Account

extension sayonfail

sharing

you are free to use this as a reference and to share with others... remember where you got it from and share the love! that includes the awesome guys working spock... namely Peter Niederwieser (@pniederw)

spock-javaone2014's People

Contributors

kensipe avatar

Stargazers

Tom Malaher avatar  avatar  avatar Gustavo Mena avatar Fuzzy Gray Cat avatar Tao Zhang avatar Luis Carlin avatar Gijs L avatar  avatar Andres Almiray avatar antsmartian avatar Libor Kramoliš avatar Carsten avatar Danny avatar Shannon Pamperl avatar Iván López avatar Oskar Berger avatar

Watchers

James Cloos avatar antsmartian avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.