public class Appli {
  
  public static void main(String argv[]) {
    Lot boiteCrayons = null;
    Commande commande = new Commande("Michel Buffa");
    Article article_cherche;

    System.out.println("-- Premier test : ajout d'article sur commande nulle --\n");

    commande.addLigne(new Stylo("bleu", "stylo à bille", "bl-01", 
					 1.50), 3);
    commande.addLigne(new Ramette(80, "papier imprimante", "pp-prn",
					    30.70), 5);
    commande.decrisToi();
    System.out.println("-- Prix de la commande  --\n");
    
    commande.getPrix();


    System.out.println("-- Second test : Création de lot, ajout, visualisation --\n");

    // article hétérogène composé de 100 stylos et 20 ramettes
    boiteCrayons = new Lot("Lot-crayon", "Lot-01");
    
    boiteCrayons.add(new Stylo("noir", "crayon papier", "pap-01", 0.25), 100);
    boiteCrayons.add(new Ramette(80, "papier imprimante", "pp-prn", 30.70), 20);
    commande.addLigne(boiteCrayons, 1);

    commande.decrisToi();

    System.out.println("-- Détails sur l'artice 2, qui est un Lot --\n");
    
    article_cherche = commande.getLigne(2).getArticle();
    System.out.println(article_cherche.identifieToi() + "\n");

    System.out.println("-- Troisième test : suppression d'articles, visualisation --\n");

    commande.deleteLigne(1);
    commande.decrisToi();

    System.out.println("-- Combien ça coûte tout ça ? --\n");
    
    commande.getPrix();
  }
}
