Skip to content
Snippets Groups Projects
Commit 2178109d authored by Läspä Vili Valtteri's avatar Läspä Vili Valtteri
Browse files

Test suite

parent 78a61c3f
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,7 @@ public class Puntti {
/**
* Testiohjelma Puntti.javalle
* @param args ei käytössä
*/
public static void main(String[] args) {
......
......@@ -10,7 +10,7 @@ public class SailoException extends Exception{
/**
* Poikkeuksen uodostaja jolle tuodaan viesti poikkeuksesta
* Poikkeuksen muodostaja jolle tuodaan viesti poikkeuksesta
* @param viesti Poikkeuksen sattuessa tuleva viesti
* @example
*/
......
......@@ -81,12 +81,12 @@ public class Tulos {
* @example
* <pre name="test">
* Tulos penkki = new Tulos();
* penkki.getid() === 0;
* penkki.getId() === 0;
* penkki.lisaaTulos();
* Tulos penkki2 = new Tulos();
* penkki2.lisaaTulos();
* int n1 = penkki.getid();
* int n2 = penkki2.getid();
* int n1 = penkki.getId();
* int n2 = penkki2.getId();
* n1 === n2-1;
* </pre>
*/
......
package puntti.test;
import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;
/**
* kaikki testit
* @author laspa
* @version 12.3.2025
*
*/
@Suite
@SelectClasses({ LiikeTest.class, LiikkeetTest.class, PunttiTest.class,
TuloksetTest.class, TulosTest.class })
public class AllTests {
//
}
package puntti.test;
// Generated by ComTest BEGIN
import static org.junit.Assert.*;
import org.junit.*;
import puntti.*;
// Generated by ComTest END
/**
* Test class made by ComTest
* @version 2025.03.12 07:08:38 // Generated by ComTest
*
*/
@SuppressWarnings("all")
public class TulosTest {
// Generated by ComTest BEGIN
/** testLisaaTulos82 */
@Test
public void testLisaaTulos82() { // Tulos: 82
Tulos penkki = new Tulos();
assertEquals("From: Tulos line: 84", 0, penkki.getId());
penkki.lisaaTulos();
Tulos penkki2 = new Tulos();
penkki2.lisaaTulos();
int n1 = penkki.getId();
int n2 = penkki2.getId();
assertEquals("From: Tulos line: 90", n2-1, n1);
} // Generated by ComTest END
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment