Search in sources :

Example 1 with Objet

use of domaine.Objet in project Synthese_2BIN by TheYoungSensei.

the class GestionEncheresTest method testEncherir8.

@Test(expected = ObjetInexistantException.class)
public void testEncherir8() throws UtilisateurInexistantException, ObjetInexistantException, EnchereInexistanteException {
    Objet objet1 = gestionEncheres.mettreEnVente("banane", utilisateur2);
    gestionEncheres.encherir(objet1, utilisateur3, 5.0, time);
    gestionEncheres.accepter(objet1);
    gestionEncheres.encherir(objet1, utilisateur4, 6.0, time);
}
Also used : Objet(domaine.Objet) Test(org.junit.Test)

Example 2 with Objet

use of domaine.Objet in project Synthese_2BIN by TheYoungSensei.

the class GestionEncheresTest method testEncherir5.

@Test
public void testEncherir5() throws UtilisateurInexistantException, ObjetInexistantException {
    Objet objet1 = gestionEncheres.mettreEnVente("banane", utilisateur2);
    gestionEncheres.encherir(objet1, utilisateur3, 5.0, time);
    assertNull(gestionEncheres.encherir(objet1, utilisateur4, 5.0, time.plusDays(1)));
}
Also used : Objet(domaine.Objet) Test(org.junit.Test)

Example 3 with Objet

use of domaine.Objet in project Synthese_2BIN by TheYoungSensei.

the class GestionEncheresTest method testEncherir2.

@Test(expected = ObjetInexistantException.class)
public void testEncherir2() throws ObjetInexistantException, UtilisateurInexistantException {
    Objet objet = new Objet("grosbo", utilisateur2);
    gestionEncheres.encherir(objet, utilisateur2, 5.0, time);
}
Also used : Objet(domaine.Objet) Test(org.junit.Test)

Example 4 with Objet

use of domaine.Objet in project Synthese_2BIN by TheYoungSensei.

the class GestionEncheresTest method testEncherir1.

@Test(expected = UtilisateurInexistantException.class)
public void testEncherir1() throws ObjetInexistantException, UtilisateurInexistantException {
    Objet objet = gestionEncheres.mettreEnVente("yoyo", utilisateur2);
    gestionEncheres.encherir(objet, utilisateur1, 5.0, time);
}
Also used : Objet(domaine.Objet) Test(org.junit.Test)

Example 5 with Objet

use of domaine.Objet in project Synthese_2BIN by TheYoungSensei.

the class GestionEncheresTest method testEncherir3.

@Test
public void testEncherir3() throws UtilisateurInexistantException, ObjetInexistantException {
    Objet objet1 = gestionEncheres.mettreEnVente("banane", utilisateur2);
    Objet objet2 = gestionEncheres.mettreEnVente("apple", utilisateur2);
    gestionEncheres.encherir(objet1, utilisateur3, 5.0, time);
    assertNull(gestionEncheres.encherir(objet2, utilisateur3, 5.0, time));
}
Also used : Objet(domaine.Objet) Test(org.junit.Test)

Aggregations

Objet (domaine.Objet)29 Test (org.junit.Test)22 Enchere (domaine.Enchere)13 Utilisateur (domaine.Utilisateur)11 Before (org.junit.Before)2 EnchereInexistanteException (exceptions.EnchereInexistanteException)1 LocalDate (java.time.LocalDate)1