30 Commits
ines ... dt2

Author SHA1 Message Date
sio
a1d5485025 CorrectionV1 2024-09-26 11:55:44 +02:00
09a7279d52 Merge dt
# Conflicts:
#	src/Test.java
#	src/métiers/Commande.java
#	test/métiers/CommandeTest.java
2024-09-25 22:03:48 +02:00
c000fb78ee Merge origin/master
# Conflicts:
#	nbproject/project.properties
#	src/métiers/Commande.java
2024-09-25 18:22:52 +02:00
b109399da5 Merge origin/master
# Conflicts:
#	nbproject/project.properties
#	src/métiers/Commande.java
2024-09-25 18:18:10 +02:00
08e7254265 Merge origin/master
# Conflicts:
#	nbproject/project.properties
#	src/métiers/Commande.java
2024-09-25 18:15:29 +02:00
6472118666 ajout gestion entreprise 2024-09-24 11:54:50 +02:00
sio
6bcc94486f mise à jour Morgann 2024-09-19 11:55:10 +02:00
9e6a9cc867 ajout page maissane 2024-09-19 11:42:33 +02:00
sio
8dc9d9d385 mise à jour pour Commande et testCommande avec Ines et Ilona 2024-09-19 11:38:57 +02:00
e4956996d6 Merge pull request 'test cas 5' (#4) from morgann into master
Reviewed-on: #4
2024-09-19 10:39:59 +02:00
6ed7fb09f2 test cas 5 2024-09-19 10:26:18 +02:00
sio
45a93f086a mise à jour pour Commande et testCommande 2024-09-19 10:11:37 +02:00
8b82fb5acd ajout CommandeTest 2024-09-19 08:29:56 +02:00
a8cd335fa6 commantaires dans ajouter de Commande 2024-09-18 18:36:04 +02:00
7136c719cc modif supprimer dans commande 2024-09-18 17:38:05 +02:00
926b12ec55 test de la classe commande 2024-09-12 11:54:27 +02:00
sio
0680043384 test cas1 2024-09-12 11:33:20 +02:00
sio
b02b4b8bcf test cas1 2024-09-12 11:25:21 +02:00
8f366b4003 modification de la méthode ajouter et de la méthode supprimer 2024-09-12 10:34:40 +02:00
ebe6f29978 modification de la méthode ajouter 2024-09-12 10:28:32 +02:00
sio
0f472d5df2 modification déclaration hashmap dans Commande 2024-09-12 10:11:11 +02:00
8543fbf45b modif classe entreprise 2024-09-12 09:41:17 +02:00
sio
935512aa7b mise à jour création commande 2024-09-12 09:38:59 +02:00
43cbdc54de Merge origin/master 2024-09-12 09:35:43 +02:00
b854ed53f4 Merge pull request 'ines' (#1) from ines into master
Reviewed-on: #1
2024-09-12 09:35:26 +02:00
51bb96a809 Merge origin/master 2024-09-12 09:30:01 +02:00
2f47f5aa52 Merge origin/master 2024-09-12 09:28:29 +02:00
427b1e0887 modif classe entreprise 2024-09-12 09:26:35 +02:00
sio
558c7f786c création classe test 2024-09-12 09:23:07 +02:00
47b73d352e ajout des éléments de la classe commande 2024-09-12 09:19:49 +02:00
8 changed files with 595 additions and 153 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
#pour netbeans
Libraries/*
Test Libraries/*
Test Libraries/*
/nbproject/private/
/build/

View File

@ -1,95 +1,99 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.modulepath=\
${run.modulepath}
debug.test.classpath=\
${run.test.classpath}
debug.test.modulepath=\
${run.test.modulepath}
# Files in build.classes.dir which should be excluded from distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/MusicAndCo.jar
dist.javadoc.dir=${dist.dir}/javadoc
dist.jlink.dir=${dist.dir}/jlink
dist.jlink.output=${dist.jlink.dir}/MusicAndCo
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=\ --enable-preview --enable-preview
javac.deprecation=false
javac.external.vm=true
javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=21
javac.target=21
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.modulepath=\
${javac.modulepath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.html5=false
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
# The jlink additional root modules to resolve
jlink.additionalmodules=
# The jlink additional command line parameters
jlink.additionalparam=
jlink.launcher=true
jlink.launcher.name=MusicAndCo
main.class=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=\ --enable-preview
run.modulepath=\
${javac.modulepath}
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
run.test.modulepath=\
${javac.test.modulepath}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.modulepath=\
${run.modulepath}
debug.test.classpath=\
${run.test.classpath}
debug.test.modulepath=\
${run.test.modulepath}
# Files in build.classes.dir which should be excluded from distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/MusicAndCo.jar
dist.javadoc.dir=${dist.dir}/javadoc
dist.jlink.dir=${dist.dir}/jlink
dist.jlink.output=${dist.jlink.dir}/MusicAndCo
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=\ --enable-preview --enable-preview
javac.deprecation=false
javac.external.vm=true
javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=21
javac.target=21
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.testng.classpath}:\
${libs.junit_5.classpath}:\
${libs.junit_4.classpath}:\
${libs.hamcrest.classpath}
javac.test.modulepath=\
${javac.modulepath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.html5=false
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
# The jlink additional root modules to resolve
jlink.additionalmodules=
# The jlink additional command line parameters
jlink.additionalparam=
jlink.launcher=true
jlink.launcher.name=MusicAndCo
main.class=MusicAndCo.Test
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=\ --enable-preview
run.modulepath=\
${javac.modulepath}
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
run.test.modulepath=\
${javac.test.modulepath}
source.encoding=UTF-8
src.dir=src
test.src.dir=test

90
src/MusicAndCo/Test.java Normal file
View File

@ -0,0 +1,90 @@
package MusicAndCo;
import static java.lang.String.format;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import métiers.Commande;
import métiers.Entreprise;
import métiers.Instrument;
import java.util.Scanner;
/**
*
* @author sio
*/
public class Test {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner lectureClavier=new Scanner(System.in);
DateFormat format = new SimpleDateFormat("dd/MM/yyyy");
Date date = new Date();
Entreprise lEntreprise=new Entreprise("MusicAndCo");
Commande laCommande1 = new Commande(1,1,format.format(date));
Commande laCommande2 = new Commande(2,1,format.format(date));
System.out.println("Bienvenue dans ma boutique :" + lEntreprise.getRaisonSociale());
//Première commande
System.out.println("Préparons votre commande :"+laCommande1.toString());
System.out.println("Voici les instruments en stock :");
//ajouter des instruments de l'entreprise à la commande
boolean rep=false;
do {
int ref=menu(lEntreprise); //le menu affiche les instruments
System.out.print("En quelle quantité ?");
int qte=lectureClavier.nextInt();
laCommande1.ajouter(lEntreprise.getLesInstruments().get(ref), qte);
System.out.print("Voulez-vous ajouter un autre instrument à votre commande (oui/non) ?");
String reponse=lectureClavier.next();
rep = "oui".equals(reponse);
}while(rep);
//affecter la commande à l'entreprise si la commande est possible
lEntreprise.ajouterCommande(laCommande1);
System.out.println("Voici votre commande"+lEntreprise.getLesCommandes().get(0));
//--------------------------------------
//créer une autre commande
System.out.println("Voilà l'autre commande :"+laCommande2.toString());
System.out.println("Voici les instruments en stock :");
//ajouter des instruments de l'entreprise à la commande
rep=false;
do {
int ref=menu(lEntreprise);
System.out.print("En quelle quantité ?");
int qte=lectureClavier.nextInt();
laCommande2.ajouter(lEntreprise.getLesInstruments().get(ref), qte);
System.out.print("Voulez-vous ajouter un autre instrument à votre commande (oui/non) ?");
String reponse=lectureClavier.next();
rep = "oui".equals(reponse);
}while(rep);
//affecter la commande à l'entreprise si la commande est possible
lEntreprise.ajouterCommande(laCommande2);
System.out.println("Voici votre commande"+lEntreprise.getLesCommandes().get(1));
//rechercher et afficher une commande
//supprimer une des 2 commandes
//vériffier les stocks après suppression de la commande
}
static int menu(Entreprise uneEnt){
Scanner lectureClavier=new Scanner(System.in);
System.out.println("Choisir un instrument :");
int i=0;
for(Instrument lInst : uneEnt.getLesInstruments()){
i=i+1;
System.out.print(i + "- ");
System.out.println(lInst.toString());
}
System.out.print("Quel instrument voulez-vous ? ");
return lectureClavier.nextInt()-1;
}
}

View File

@ -1,13 +1,160 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package métiers;
/**
*
* @author famille Thevenot
*/
public class Commande {
}
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package métiers;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
*
* @author ilona
*/
public class Commande {
private int noCom, noVendeur;
private String dateCom;
private final HashMap<Instrument, Integer> lesLignes = new HashMap<>();
public Commande(int noCom, int noVendeur, String dateCom) {
this.noCom = noCom;
this.noVendeur = noVendeur;
this.dateCom = dateCom;
}
/**
* Ajoute une quantité donnée d'un instrument à la commande
* @param unInstrument instrument à ajouter
* @param qte quantité à ajouter
* @return true si l'ajout est bon
*/
public boolean ajouter(Instrument unInstrument, int qte){
//il faut empêcher l'ajout d'une ligne avec une quantité à 0
//bien s'assurer que le stock est suffisant
boolean ajoutOK=false;
if(qte==0) System.out.println("Vous ne pouvez pas commander une quantité 0");
else{
//ajout d'un instrument existant dans la commande, ce sera une mise à jour de la ligne
if (lesLignes.containsKey(unInstrument))//l'instrument existe
{
//récupération de la quantité en stock
int oldQte=unInstrument.getQteStock();
//réaffectation dans le stock de la quantité commandée
int qteStock=oldQte+ this.getLesLignes().get(unInstrument);
unInstrument.setQteStock(qteStock);
//suppression ligne commande
lesLignes.remove(unInstrument);
//nouvel ajout
this.ajouter(unInstrument,qte);
System.out.println("Ligne de commande préexistante mise à jour");
}
else //nouvel instrument
{
//on s'assure qu'il y a assez de stock pour la commande
int qteDisponible = unInstrument.getQteStock();
if (qteDisponible<qte){
ajoutOK = false;
System.out.println("Ajout impossible, quantité en stock insuffisante");
}else {
ajoutOK = true;
lesLignes.put(unInstrument,qte);
//màj qté stock pour déduire la qté commandée
unInstrument.setQteStock(qteDisponible-qte);
System.out.println("Instrument ajouté à la commande");
}
}
}
return ajoutOK;
}
/**
* Supprimer un instrument de la commande
* @param unInstrument instrument à supprimer
* @return true si la suppression est effectuée
*/
public boolean supprimer(Instrument unInstrument){
//lesLignes.remove(unInstrument);
boolean suppOK;
if (lesLignes.containsKey(unInstrument) == true){
suppOK = true;
//récupération de la quantité en stock
int oldQte=unInstrument.getQteStock();
//réaffectation dans le stock de la quantité commandée
int qteStock=oldQte+ this.getLesLignes().get(unInstrument);
unInstrument.setQteStock(qteStock);
//suppression ligne commande
lesLignes.remove(unInstrument);
} else {
suppOK = false;
}
return suppOK;
}
/////////////////////////////////////////////////////////////////////////////////
public int getNoCom() {
return noCom;
}
public int getNoVendeur() {
return noVendeur;
}
public String getDateCom() {
return dateCom;
}
public HashMap<Instrument, Integer> getLesLignes() {
return lesLignes;
}
public void setNoCom(int noCom) {
this.noCom = noCom;
}
public void setNoVendeur(int noVendeur) {
this.noVendeur = noVendeur;
}
public void setDateCom(String dateCom) {
this.dateCom = dateCom;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Commande other = (Commande) obj;
if (this.noCom != other.noCom) {
return false;
}
if (this.noVendeur != other.noVendeur) {
return false;
}
return Objects.equals(this.dateCom, other.dateCom);
}
@Override
public String toString() {
return " "+noCom+" du vendeur " + noVendeur + ", du " + dateCom + ", contient " + lesLignes + '}';
}
}

View File

@ -1,43 +1,82 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package métiers;
import métiers.Commande;
/**
*
* @author famille Thevenot
*/
public class Entreprise {
private String raisonSociale;
public Entreprise(String raisonSociale) {
this.raisonSociale = raisonSociale;
}
public String getRaisonSociale() {
return raisonSociale;
}
public void setRaisonSociale(String raisonSociale) {
this.raisonSociale = raisonSociale;
}
@Override
public String toString() {
return "Entreprise{" + "raisonSociale=" + raisonSociale + '}';
}
public void ajouterCommande(Commande uneCommande){
}
public void supprimerCommande(Commande uneCommande){
}
public Commande rechercherCommande(int noCom){
Commande laCommande=null;
return laCommande;
}
}
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package métiers;
import java.util.ArrayList;
import métiers.Commande;
import métiers.Instrument;
/**
*
* @author famille Thevenot
*/
public class Entreprise {
private String raisonSociale;
private ArrayList<Commande> lesCommandes = new ArrayList<>();
private ArrayList<Instrument> lesInstruments = new ArrayList<>();
public Entreprise(String raisonSociale) {
this.raisonSociale = raisonSociale;
Instrument instr1=new Instrument(23,"Piano droit",3, 8300f);
Instrument instr2=new Instrument(54,"Violon Alto",5, 105f);
Instrument instr3=new Instrument(67,"Guitare Classique",8, 575f);
lesInstruments.add(instr1);
lesInstruments.add(instr2);
lesInstruments.add(instr3);
}
public ArrayList<Commande> getLesCommandes() {
return lesCommandes;
}
public void setLesCommandes(ArrayList<Commande> lesCommandes) {
this.lesCommandes = lesCommandes;
}
public ArrayList<Instrument> getLesInstruments() {
return lesInstruments;
}
public void setLesInstruments(ArrayList<Instrument> lesInstruments) {
this.lesInstruments = lesInstruments;
}
public String getRaisonSociale() {
return raisonSociale;
}
public void setRaisonSociale(String raisonSociale) {
this.raisonSociale = raisonSociale;
}
@Override
public String toString() {
return "Entreprise{" + "raisonSociale=" + raisonSociale + '}';
}
public void ajouterCommande(Commande uneCommande){
lesCommandes.add(uneCommande);
}
public void supprimerCommande(Commande uneCommande){
//parcours pour supprimer les instruments de la commande
//suppression de la commande
lesCommandes.remove(uneCommande);
}
public Commande rechercherCommande(int noCom){
Commande uneCommande = null;
for(Commande laCommande : lesCommandes){
if(laCommande.getNoCom() == noCom){
uneCommande = laCommande;
break;
}
}
return uneCommande;
}
}

View File

@ -25,7 +25,7 @@ public class Instrument {
@Override
public String toString() {
return "Instrument{" + "ref=" + ref + ", designation=" + designation + ", qteStock=" + qteStock + ", prix=" + prix + '}';
return designation + ", Stock=" + qteStock + ", prix=" + prix ;
}
public void setRef(int ref) {

View File

@ -0,0 +1,133 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/UnitTests/JUnit4TestClass.java to edit this template
*/
package métiers;
import java.util.HashMap;
/**
*
* @author famille Thevenot
*/
public class CommandeTest {
public CommandeTest() {
}
public void setUp() {
}
/**
* Test of ajouter method, of class Commande.
*/
public void testAjouter() {
Instrument instr1=new Instrument(1,"Piano",10, 8300f);
Instrument instr2=new Instrument(2,"Violon",9, 105f);
Instrument instr3=new Instrument(3,"piano",8, 105f);
Commande laCommande = new Commande(1,1,"12/09/2024");
System.out.println("ajouter");
//cas 0
boolean ajoutRes= laCommande.ajouter(instr1, 2);
boolean ajoutAttendu = true;
System.out.println("cas0 : cas normal, ajout une ligne de commande");
assertEquals("Test0 ajout 2 instr1",ajoutAttendu,ajoutRes);
int stockRes=instr1.getQteStock();
int stockAttendu=8;
assertEquals("Test0 stock",stockAttendu,stockRes);
int qteRes=laCommande.getLesLignes().get(instr1);
int qteAttendu=2;
assertEquals("Test0 quantite",qteRes, qteAttendu);
//cas 1
System.out.println("Cas1 : ajout autre ligne de commande");
laCommande.ajouter(instr2, 6);
int tailleR=laCommande.getLesLignes().size();
int tailleAttendue=2;
assertEquals("Test1 taille",tailleAttendue,tailleR);
//Cas2
System.out.println("Cas2 : màj quantité commandée d'une ligne existante");
laCommande.ajouter(instr2, 5);
stockRes=instr2.getQteStock();
stockAttendu=4;
assertEquals("test2 stock",stockAttendu,stockRes );
qteRes=laCommande.getLesLignes().get(instr2);
qteAttendu=5;
assertEquals("Test2 quantite", qteAttendu,qteRes);
/*INES*/
System.out.println("Cas3 : ajout nouvelle ligne avec quantité > stock");
boolean test= laCommande.ajouter(instr3, 12);
stockRes=instr3.getQteStock();
stockAttendu=8;
boolean testResultExpected=false;
assertEquals("test3 stock",stockAttendu,stockRes );
assertEquals("La méthode ajouter retourne false",testResultExpected,test );
System.out.println("Nombre de ligne dans le dictionnaire: "+laCommande.getLesLignes().size());
System.out.println("Résultat de la méthode ajouter: " + test);
/*MAISSANE*/
System.out.println("Cas4 : ajout nouvelle ligne avec quantité 0");
System.out.println("Cas4 : ajout nouvelle ligne avec quantité 0");
boolean AjouterObtenu=laCommande.ajouter(instr3, 0);
boolean AjouterA= false;
assertEquals("Test4 ajout 0 instr3",AjouterA,AjouterObtenu);
int lignes=laCommande.getLesLignes().size();
int nbLigneAttendu = 2;
assertEquals("Test4 taille",nbLigneAttendu,lignes);
qteRes=laCommande.getLesLignes().get(instr3);
qteAttendu=0;
assertEquals("Test4 quantite", qteAttendu,qteRes);
/*MORGANN*/
System.out.println("Cas5 : mise à 0 quantité commandée d'une ligne existante");
laCommande.ajouter(instr2, 0);
stockRes=instr2.getQteStock();
stockAttendu=9;
assertEquals("test5 stock",stockAttendu,stockRes );
tailleR=laCommande.getLesLignes().size();
tailleAttendue=2;
assertEquals("Test1 taille",tailleAttendue,tailleR);
/*ILONA*/
System.out.println("Cas6 : màj d'une ligne existante avec qté>stock");
System.out.println("Cas6 : màj d'une ligne existante avec qté>stock");
boolean resultatMethode = laCommande.ajouter(instr1, 12);
boolean resultatMethodeAttendu=false;
assertEquals("test6 mise à jour",resultatMethodeAttendu,resultatMethode);
stockRes=instr1.getQteStock();
stockAttendu=2;
assertEquals("test6 stock",stockAttendu,stockRes );
}
private void assertEquals(String test1_taille, int tailleAttendue, int tailleR) {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
private void assertEquals(String la_méthode_ajouter_retourne_false, boolean testResultExpected, boolean test) {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
}
/**
* 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("test supprimer",expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}*/
}

View File

@ -0,0 +1,27 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="MusicAndCo">
<!--
see examples at http://testng.org/doc/documentation-main.html#testng-xml
<suite-files>
<suite-file path="./junit-suite.xml" />
</suite-files>
<test name="TimeOut">
<classes>
<class name="test.timeout.TimeOutTest" />
<class name="test.timeout.TimeOutFromXmlTest"/>
<class name="test.timeout.TimeOutThreadLocalSampleTest"/>
</classes>
</test>
-->
<test name="métiers suite">
<packages>
<package name="métiers"/>
</packages>
</test>
</suite>