User Tools

Site Tools


java:junit4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
java:junit4 [2010/07/31 01:01] rlunarojava:junit4 [2010/07/31 01:17] rlunaro
Line 52: Line 52:
 import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
  
 +import static org.junit.Assert.*;
  
  
Line 83: Line 84:
  System.out.println("hello spring");  System.out.println("hello spring");
  element.setIdAndContent( -1, new StringBuilder("hola") );  element.setIdAndContent( -1, new StringBuilder("hola") );
 + assertTrue( true ); 
  }  }
   
Line 138: Line 140:
 Otro problema bastante común es que se produce un error "File not found exception": a mí me ocurrió porque no tenía el fichero applicationContext.xml en la misma carpeta que la clase.  Otro problema bastante común es que se produce un error "File not found exception": a mí me ocurrió porque no tenía el fichero applicationContext.xml en la misma carpeta que la clase. 
  
-===== Tercer error: Creando una Suite que agrupe a todos los test =====+===== Segundo error: Creando una Suite que agrupe a todos los test =====
  
 Tampoco se os ocurra crear la suite de tests usando el asistente de eclipse. Aquí hay que picarlo todo a mano. Os paso un ejemplo de los muchos que hay por internet:  Tampoco se os ocurra crear la suite de tests usando el asistente de eclipse. Aquí hay que picarlo todo a mano. Os paso un ejemplo de los muchos que hay por internet: 
java/junit4.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1