Differences

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

Link to this comparison view

poo-ca-cd:alte-resurse:junit-java [2021/10/16 13:38]
radu_bogdan.pavel [Unit testing]
poo-ca-cd:alte-resurse:junit-java [2021/11/24 00:52] (current)
radu_bogdan.pavel [Unit testing]
Line 101: Line 101:
 import org.junit.jupiter.api.* import org.junit.jupiter.api.*
  
-public class Test {+public class GroupTest ​{
     private Group group;     private Group group;
  
Line 111: Line 111:
     @Test     @Test
     public void testNoStudentInGroup() {     public void testNoStudentInGroup() {
-        ​Assert.assertEquals(false,​ group.areStudentsInGroup());​+        ​Assertions.assertEquals(false,​ group.areStudentsInGroup());​
     }     }
  
Line 119: Line 119:
         group.addStudent(st);​         group.addStudent(st);​
  
-        ​Assert.assertTrue(group.getStudent("​Elena"​).equals(st));​+        ​Assertions.assertTrue(group.getStudent("​Elena"​).equals(st));​
     }     }
     ​     ​
Line 155: Line 155:
  
 <note important>​ <note important>​
-În cadrul laboratorului vom folosi framework-ul JUnit5 ​adăugând fişierele [[http://​search.maven.org/​remotecontent?​filepath=junit/​junit/​4.12/​junit-4.12.jar|junit.jar]] şi [[https://​storage.googleapis.com/​google-code-archive-downloads/​v2/​code.google.com/​hamcrest/​hamcrest-all-1.3.jar|hamcrest-all-1.3.jar]] cu acesta ​la proiectele create. +Pentru a folosi framework-ul JUnit5, consultațtutorialul din [[poo-ca-cd:​laboratoare:​colectii|laboratorul 8]], aflat la secțiunea **Unit testing**.
- +
-Pentru a importa un //jar// într-un proiect din ''​Eclipse''​ parcurgeţi următorii paşi: //click dreapta proiect// -> //Build path// -> //Configure build path// -> //​Libraries//​ -> //Add jars (Add external jars)//.+
 </​note>​ </​note>​
  
Line 191: Line 189:
   * <​html><​a class="​media mediafile mf_pdf"​ href="/​poo/​laboratoare/​exceptii?​do=export_pdf">​PDF laborator</​a></​html>​   * <​html><​a class="​media mediafile mf_pdf"​ href="/​poo/​laboratoare/​exceptii?​do=export_pdf">​PDF laborator</​a></​html>​
   * {{:​poo-ca-cd:​alte-resurse:​junit-java:​skel.zip|Schelet}}   * {{:​poo-ca-cd:​alte-resurse:​junit-java:​skel.zip|Schelet}}
-  * {{:​poo-ca-cd:​alte-resurse:​junit-java:sol.zip|Soluție}}+  * {{:​poo-ca-cd:​alte-resurse:​solutie-junit.zip|Solutie}}
  
 ==== Referinţe ==== ==== Referinţe ====
poo-ca-cd/alte-resurse/junit-java.1634380702.txt.gz · Last modified: 2021/10/16 13:38 by radu_bogdan.pavel
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0