Re: Annotation driven Junit Test cases

Matthew Farwell <[email protected]>
Newsgroups gmane.comp.java.junit.user
Message-ID <CAOBkoFVu27cg_8BxSvbOxqaJz7urcNza9So6CEwz9AvU6dJXTw@mail.gmail.com>
+1. I'd like more explanation as well.

If you're looking for property testing, and you don't mind writing scala,
then you could do worse than Scalacheck:

https://github.com/rickynils/scalacheck/wiki/User-Guide

Scalacheck generates the input data for you. For instance:

scala> val propSqrt = forAll { (n: Int) => scala.Math.sqrt(n*n) == n }

which will fail, because scalacheck will try -1.

scala> propSqrt.check
! Falsified after 1 passed tests:
> -1

Matthew Farwell.

2013/4/24 Tomek Kaczanowski <[email protected]>

> **
>
>
> Hi,
>
> could you please explain what happens after you annotate the code like
> this:
>
>
> @AutoTest
> @InputParams
> @AutoAssert
> public int add(int a,int b)
> Are tests automatically generated? What test cases are created? What
> assertions?
>
> --
> Regards / Pozdrawiam
> Tomek Kaczanowski
> http://practicalunittesting.com
>
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/junit/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/junit/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.