/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/UnitTests/JUnit5TestClass.java to edit this template
 */
package métiers;

import java.util.HashMap;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeAll;

/**
 *
 * @author sio
 */
public class CommandeTest {
    
    public CommandeTest() {
    }

    @BeforeAll
    public static void setUpClass() throws Exception {
    }

    @AfterAll
    public static void tearDownClass() throws Exception {
    }
    
    @BeforeEach
    public void setUp() {
    }

    @AfterEach
    public void tearDown() throws Exception {
    }

    /**
     * Test of ajouter method, of class Commande.
     */
    @Test
    public void testAjouter() {
        System.out.println("ajouter");
        Commande instance = null;
        Instrument instr1=new Instrument(1,"Piano",10, 8300f);
        Instrument instr2=new Instrument(2,"Violon",9, 105f);
        Instrument instr3=new Instrument(3,"Guitare",8, 575f);
        //Cas0
        instance.ajouter(instr1, 2);
        // Cas1
            
        instance.ajouter(instr2, 6);
        
        int nbLignesAttendues=2;
        int nbLignes=instance.getLesLignes().size();
        assertEquals("Cas01 : test nb lignes ",nbLignesAttendues,nbLignes);
        
        
    }

    /**
     * Test of supprimer method, of class Commande.
     */
    @Test
    public void testSupprimer() {
        System.out.println("supprimer");
        Instrument unInstrument = null;
        Commande instance = null;
        boolean expResult = false;
        boolean result = instance.supprimer(unInstrument);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of getNoCom method, of class Commande.
     */
    @Test
    public void testGetNoCom() {
        System.out.println("getNoCom");
        Commande instance = null;
        int expResult = 0;
        int result = instance.getNoCom();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of getNoVendeur method, of class Commande.
     */
    @Test
    public void testGetNoVendeur() {
        System.out.println("getNoVendeur");
        Commande instance = null;
        int expResult = 0;
        int result = instance.getNoVendeur();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of getDateCom method, of class Commande.
     */
    @Test
    public void testGetDateCom() {
        System.out.println("getDateCom");
        Commande instance = null;
        String expResult = "";
        String result = instance.getDateCom();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of getLesLignes method, of class Commande.
     */
    @Test
    public void testGetLesLignes() {
        System.out.println("getLesLignes");
        Commande instance = null;
        HashMap<Instrument, Integer> expResult = null;
        HashMap<Instrument, Integer> result = instance.getLesLignes();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of setNoCom method, of class Commande.
     */
    @Test
    public void testSetNoCom() {
        System.out.println("setNoCom");
        int noCom = 0;
        Commande instance = null;
        instance.setNoCom(noCom);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of setNoVendeur method, of class Commande.
     */
    @Test
    public void testSetNoVendeur() {
        System.out.println("setNoVendeur");
        int noVendeur = 0;
        Commande instance = null;
        instance.setNoVendeur(noVendeur);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of setDateCom method, of class Commande.
     */
    @Test
    public void testSetDateCom() {
        System.out.println("setDateCom");
        String dateCom = "";
        Commande instance = null;
        instance.setDateCom(dateCom);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of equals method, of class Commande.
     */
    @Test
    public void testEquals() {
        System.out.println("equals");
        Object obj = null;
        Commande instance = null;
        boolean expResult = false;
        boolean result = instance.equals(obj);
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    private void assertEquals(String test_nb_lignes, int nbLignesAttendues, int i) {
        throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
    }

    private void assertEquals(boolean expResult, boolean result) {
        throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
    }

    private void assertEquals(int expResult, int result) {
        throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
    }

    private void assertEquals(String expResult, String result) {
        throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
    }

    private void assertEquals(HashMap<Instrument, Integer> expResult, HashMap<Instrument, Integer> result) {
        throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
    }

   

    
}