package Shop; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class CartTest { @Test void testEquals() { Products p1 = new Products("Wein", 0.7, 1.2, 4.20, 19, 87); Products p2 = new Products("Wein", 0.7, 1.2, 4.20, 19, 87); assertTrue(p1.equals(p2)); } @Test void testConstructor() { Products p1 = new Products("Wein", 0.7, 1.2, 4.20, 19, 87); Products p2 = new Products("Kokosmilch", 250, 0.275, 1.67, 7, 12); assertEquals("Wein", p1.getName()); assertEquals("Kokosmilch", p2.getName()); assertEquals(4.20, p1.getNetWorth()); assertEquals(1.67, p2.getNetWorth()); } }