TestedBy
Un’interessante idea di Stefano a proposito dei test. Cambiare il punto di vista: dal test che verifica il comportamento di una o più classi, alla classe a cui sono collegati dei test che verificano il comportamento della stessa e stabiliscono un contratto, cioè esplicitando comportamenti che poi vengono documentati, anche nel javadoc.
public class TestedBySample {
/**
* @param args
*/
public static void main( String[] args ) {
TestedBySample sample = new TestedBySample();
System.out.print(sample.add(1, 2));
}
@TestedBy( testClass = "it.javalinux.testedby.TestedBySampleTest", testMethod = "addShouldWork" )
public int add( int i,
int j ) {
return i + j;
}
@TestedByList( {@TestedBy( testClass = "it.javalinux.testedby.TestedBySampleTest", testMethod = "addShouldWork" ),
@TestedBy( testClass = "it.javalinux.testedby.TestedBySampleTest", testMethod = "addShouldWork2" )} )
public int add2( int i,
int j ) {
return i + j;
}
Il link del progetto è: http://code.google.com/p/testedby/
Non c'è ancora nessun commento.
Lascia un commento
-
Archivi
- maggio 2009 (2)
- febbraio 2009 (1)
- gennaio 2009 (1)
- dicembre 2008 (2)
- ottobre 2008 (1)
- settembre 2008 (5)
- agosto 2008 (6)
- giugno 2008 (2)
- maggio 2008 (1)
- aprile 2008 (1)
- marzo 2008 (4)
- febbraio 2008 (2)
-
Categorie
- 3d
- amenità
- amici
- animali
- apple
- atomica
- bug
- canvas
- cazzate
- css
- curiosità
- dieta
- discussioni
- divertente
- drm
- excel
- Explorer
- Firefox
- Firefox 3
- folklore
- freedom
- freeware
- gatti
- giochi
- gpl
- gwt
- hardware
- html
- html 5
- iMac
- internet
- java
- javascript
- libertà
- linux
- mac
- Macintosh
- mobile
- mod
- modellismo ferroviario
- movimenti
- navi
- news
- objective c
- open source
- Opera
- p2p
- performance
- personale
- Safari
- sdk
- seam
- sicurezza
- singleton
- software
- standard
- static methods
- storia
- svg
- sviluppo
- tecnologia
- troubleshooting
- tv
- ubuntu
- umorismo
- Uncategorized
- usabilità
- videogame
- vista
- web
- WebKit
- windows
- wise
- world of warcraft
- wwii
- xhtml
- xml
- xpath
- xslt
-
RSS
Ingressi RSS
Commenti RSS