package shop.backend;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class ProductsTest {

    @Test
    public void testGetters() {

        Product product = new Product(1, "Test Product", 1.5, 10.0, 19.0, 50);
        assertEquals(1, product.getProdID());
        assertEquals("Test Product", product.getName());
        assertEquals(1.5, product.getTransportWeight());
        assertEquals(10.0, product.getNetPrice());
        assertEquals(19.0, product.getMwst());
        assertEquals(50, product.getStock());
    }
    @Test
    public void testEquals() {
        Product product1 = new Product(1, "Bier", 1.5, 10.0, 19.0, 50);
        Product product2 = new Product(2, "Bier", 2.0, 10.0, 7.0, 100);
        Product product3 = new Product(3, "Mango", 1.5, 10.0, 19.0, 50);
        assertTrue(product1.equals(product2));
        assertFalse(product1.equals(product3));
    }



}