MusicAndCo/test/métiers/CommandeNGTest.java
2024-09-12 11:54:27 +02:00

53 lines
1.3 KiB
Java

/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/UnitTests/EmptyTestNGTest.java to edit this template
*/
package métiers;
import java.util.HashMap;
import static org.testng.Assert.*;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
*
* @author ines.benalia
*/
public class CommandeNGTest {
public CommandeNGTest() {
}
@BeforeMethod
public void setUpMethod() throws Exception {
}
@Test
public void testAjouter() {
System.out.println("ajouter");
Instrument instr2=new Instrument(2,"Violon",9, 105f);
// Instrument instr3=new Instrument(3,"Guitare",8, 575f);
Commande laCommande = new Commande(1,1,"12/09/2024");
boolean expResult = true;
boolean result = laCommande.ajouter(instr2, 5);
assertEquals(result, expResult);
}
@Test
public void testSupprimer() {
System.out.println("supprimer");
Instrument unInstrument = null;
Commande instance = null;
boolean expResult = false;
boolean result = instance.supprimer(unInstrument);
assertEquals(result, expResult);
fail("The test case is a prototype.");
}
}