
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterEach;

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

class CalculatriceAdvancedOperationsTest {

    private Calculatrice calculatrice;

    @BeforeEach
    void setUp() {
        calculatrice = new Calculatrice();
        System.out.println("Initialisation de la calculatrice.");
    }

    @AfterEach
    void tearDown() {
        calculatrice = null;
        System.out.println("Nettoyage terminé.");
    }

    @Test
    void testMultiplication() {
        int resultat = calculatrice.multiplication(10, 5);
        assertEquals(50, resultat, "La multiplication de 10 et 5 doit donner 50");
    }

    @Test
    void testDivision() {
        int resultat = calculatrice.division(10, 2);
        assertEquals(5, resultat, "La division de 10 par 2 doit donner 5");
    }
}
