File tree Expand file tree Collapse file tree
src/test/java/es/codeurjc/test/ejem Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
2+ xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
4+ <modelVersion >4.0.0</modelVersion >
5+
6+ <groupId >es.codeurjc.test</groupId >
7+ <artifactId >tema1_2-ejem0</artifactId >
8+ <version >0.0.1-SNAPSHOT</version >
9+ <packaging >jar</packaging >
10+
11+ <properties >
12+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
13+ <maven .compiler.source>1.8</maven .compiler.source>
14+ <maven .compiler.target>1.8</maven .compiler.target>
15+ </properties >
16+
17+ <dependencies >
18+ <dependency >
19+ <groupId >org.junit.jupiter</groupId >
20+ <artifactId >junit-jupiter-engine</artifactId >
21+ <version >5.6.0</version >
22+ <scope >test</scope >
23+ </dependency >
24+ </dependencies >
25+
26+ <build >
27+ <plugins >
28+ <plugin >
29+ <artifactId >maven-surefire-plugin</artifactId >
30+ <version >2.19.1</version >
31+ <dependencies >
32+ <dependency >
33+ <groupId >org.junit.platform</groupId >
34+ <artifactId >junit-platform-surefire-provider</artifactId >
35+ <version >1.0.2</version >
36+ </dependency >
37+ </dependencies >
38+ </plugin >
39+ </plugins >
40+ </build >
41+ </project >
Original file line number Diff line number Diff line change 1+ package es .codeurjc .test .ejem ;
2+
3+ import static org .junit .jupiter .api .Assertions .assertTrue ;
4+
5+ import java .util .ArrayList ;
6+ import java .util .List ;
7+
8+ import org .junit .jupiter .api .Test ;
9+
10+ public class ListTest {
11+
12+ @ Test
13+ public void testSuma () {
14+
15+ //Given
16+ List <String > list = new ArrayList <>();
17+
18+ //When
19+ list .add ("Hola" );
20+
21+ //Then
22+ assertTrue (list .size () == 1 );
23+ }
24+
25+ }
You can’t perform that action at this time.
0 commit comments