a few tests

main
Lukas Klipfel 2025-12-15 02:38:45 +01:00
parent dd2f5440af
commit e821efa86e
7 changed files with 84 additions and 8 deletions

View File

@ -2,5 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -0,0 +1,20 @@
package backend;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class BestellungTest {
@Test
void testConstructor() {
Bestellung p1 = new Bestellung(0, new Warenkorb());
Bestellung p2 = new Bestellung(1, new Warenkorb());
assertEquals(0, p1.id);
assertEquals(1, p2.id);
assertEquals(false, p1.storniert);
assertEquals(false, p2.storniert);
}
}

View File

@ -0,0 +1,21 @@
package backend;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class KundeTest {
@Test
void testConstructor() {
Kunde p1 = new Kunde("0", "ha");
Kunde p2 = new Kunde("1", "hu");
assertEquals("0", p1.name);
assertEquals("1", p2.name);
assertEquals("ha", p1.Adresse);
assertEquals("hu", p2.Adresse);
}
}

View File

@ -0,0 +1,14 @@
package backend;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class OnlineShopTest {
@Test
void test() {
fail("Not yet implemented");
}
}

View File

@ -0,0 +1,14 @@
package backend;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class ProduktTest {
@Test
void test() {
fail("Not yet implemented");
}
}

View File

@ -0,0 +1,14 @@
package backend;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class WarenkorbTest {
@Test
void test() {
fail("Not yet implemented");
}
}

View File

@ -1,8 +0,0 @@
/**
*
*/
/**
*
*/
module OnlineShop {
}