petites modifs test
This commit is contained in:
parent
2e18a09edd
commit
6c94749dfb
5 changed files with 21 additions and 25 deletions
|
@ -87,7 +87,7 @@ public class BenevoleDemandesEncoursPage extends JFrame {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Méthode pour finaliser une demande
|
// Méthode pour finaliser une demande
|
||||||
void finaliserDemande() {
|
private void finaliserDemande() {
|
||||||
int selectedRow = table.getSelectedRow();
|
int selectedRow = table.getSelectedRow();
|
||||||
if (selectedRow == -1) {
|
if (selectedRow == -1) {
|
||||||
JOptionPane.showMessageDialog(this, "Veuillez sélectionner une demande à finaliser.");
|
JOptionPane.showMessageDialog(this, "Veuillez sélectionner une demande à finaliser.");
|
||||||
|
|
|
@ -84,40 +84,40 @@ public class MenuBenevole extends JFrame{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
//Méthodes de type get()
|
||||||
MenuBenevole menu = new MenuBenevole(2);
|
|
||||||
menu.setVisible(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public JButton getVoirDemandesAcceptesButton() {
|
public JButton getVoirDemandesAcceptesButton() {
|
||||||
return voirDemandesAcceptesButton;
|
return voirDemandesAcceptesButton;
|
||||||
}
|
}
|
||||||
|
public JButton getVoirDemandesEnCoursButton() {
|
||||||
|
return voirDemandesEnCoursButton;
|
||||||
|
}
|
||||||
|
public JButton getVoirDemandesFinaliseesButton() {
|
||||||
|
return voirDemandesFinaliseesButton;
|
||||||
|
}
|
||||||
|
public JButton getRetourButton() {
|
||||||
|
return retourButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Méthodes de type set()
|
||||||
public void setVoirDemandesAcceptesButton(JButton voirDemandesAcceptesButton) {
|
public void setVoirDemandesAcceptesButton(JButton voirDemandesAcceptesButton) {
|
||||||
this.voirDemandesAcceptesButton = voirDemandesAcceptesButton;
|
this.voirDemandesAcceptesButton = voirDemandesAcceptesButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JButton getVoirDemandesEnCoursButton() {
|
|
||||||
return voirDemandesEnCoursButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVoirDemandesEnCoursButton(JButton voirDemandesEnCoursButton) {
|
public void setVoirDemandesEnCoursButton(JButton voirDemandesEnCoursButton) {
|
||||||
this.voirDemandesEnCoursButton = voirDemandesEnCoursButton;
|
this.voirDemandesEnCoursButton = voirDemandesEnCoursButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JButton getVoirDemandesFinaliseesButton() {
|
|
||||||
return voirDemandesFinaliseesButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVoirDemandesFinaliseesButton(JButton voirDemandesFinaliseesButton) {
|
public void setVoirDemandesFinaliseesButton(JButton voirDemandesFinaliseesButton) {
|
||||||
this.voirDemandesFinaliseesButton = voirDemandesFinaliseesButton;
|
this.voirDemandesFinaliseesButton = voirDemandesFinaliseesButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JButton getRetourButton() {
|
|
||||||
return retourButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRetourButton(JButton retourButton) {
|
public void setRetourButton(JButton retourButton) {
|
||||||
this.retourButton = retourButton;
|
this.retourButton = retourButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
MenuBenevole menu = new MenuBenevole(2);
|
||||||
|
menu.setVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class Validateur extends JFrame {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Méthode pour rejeter une demande
|
// Méthode pour rejeter une demande
|
||||||
void rejeterDemande() {
|
private void rejeterDemande() {
|
||||||
int selectedRow = table.getSelectedRow();
|
int selectedRow = table.getSelectedRow();
|
||||||
if (selectedRow == -1) {
|
if (selectedRow == -1) {
|
||||||
JOptionPane.showMessageDialog(this, "Veuillez sélectionner une demande à rejeter.");
|
JOptionPane.showMessageDialog(this, "Veuillez sélectionner une demande à rejeter.");
|
||||||
|
|
|
@ -80,7 +80,7 @@ class SoumettreDemandeTest {
|
||||||
assertEquals(0, tableModel.getRowCount(), "No request should be submitted if the description is empty.");
|
assertEquals(0, tableModel.getRowCount(), "No request should be submitted if the description is empty.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Test
|
@Test
|
||||||
void testModifierAvisForFinalizedRequest() throws SQLException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
void testModifierAvisForFinalizedRequest() throws SQLException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
||||||
int demandeId;
|
int demandeId;
|
||||||
|
|
||||||
|
|
|
@ -80,12 +80,8 @@ class ValidateurTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
private void rejeterDemande() {
|
void rejeterDemande() {
|
||||||
int selectedRow = table.getSelectedRow();
|
int selectedRow = table.getSelectedRow();
|
||||||
if (selectedRow == -1) {
|
if (selectedRow == -1) {
|
||||||
// Handle the case where no row is selected
|
// Handle the case where no row is selected
|
||||||
|
|
Loading…
Reference in a new issue