content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 07:40:45 GMT 2024
   */
  
  package fr.unice.gfarce.interGraph;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  import static org.evosuite.runtime.EvoAssertions.*;
  import fr.unice.gfarce.interGraph.ModifTableStockage;
  import fr.unice.gfarce.interGraph.TableStockage;
  import java.awt.HeadlessException;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class ModifTableStockage_ESTest extends ModifTableStockage_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSelectMailThrowsHeadlessException() throws Throwable  {
        TableStockage tableStorage = new TableStockage();
        ModifTableStockage modificationTableStorage = new ModifTableStockage(tableStorage);
        // Undeclared exception!
        try {
        modificationTableStorage.selectMail();
        fail("Expecting exception: HeadlessException");
        
        } catch(HeadlessException e) {
        //
        // no message in exception (getMessage() returned null)
        //
        verifyException("java.awt.GraphicsEnvironment", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFusionnerColonnesThrowsHeadlessException() throws Throwable  {
        // Given a TableStockage object and a ModifTableStockage object with the TableStockage object as its parameter
        TableStockage stock = new TableStockage();
        ModifTableStockage modifier = new ModifTableStockage(stock);
        
        // When we try to merge columns with an index that is less than 0
        modifier.fusionnerColonnes((-283));
        
        // Then we expect a HeadlessException to be thrown with the correct message
        try {
        fail("Expecting exception: HeadlessException");
        } catch (HeadlessException e) {
        // The message in the exception should be "java.awt.GraphicsEnvironment"
        verifyException("java.awt.GraphicsEnvironment", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSupprimerLigne() throws Throwable  {
        // Initialize a new instance of TableStockage with 77 rows and 0 columns
        TableStockage table = new TableStockage(77, 0);
        
        // Create a new instance of ModifTableStockage with the initial table as parameter
        ModifTableStockage modifier = new ModifTableStockage(table);
        
        // Use the modifier to delete the first line (index 0) from the table
        TableStockage deletedLine = modifier.supprimerLigne(0);
        
        // Assert that the row count of the deleted line is 75, as expected
        assertEquals(75, deletedLine.getRowCount());
        
        // Assert that the column count of the deleted line is 0, as expected
        assertEquals(0, deletedLine.getColumnCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAjouterLigneThrowsHeadlessException() throws Throwable  {
        TableStockage arg0 = new TableStockage();
        ModifTableStockage modifTableStockage = new ModifTableStockage(arg0);
        // Check that an exception is thrown when trying to add a line without specifying the column names
        try {
        modifTableStockage.ajouterLigne();
        fail("Expecting exception: HeadlessException");
        } catch(HeadlessException e) {
        // Verify that the expected exception was thrown
        verifyException("java.awt.GraphicsEnvironment", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testColonneMailReturningTableStockageWhereGetRowCountIsPositive() throws Throwable  {
        // Given a table stockage with 88 rows and 88 columns
        TableStockage arg0 = new TableStockage(88, 88);
        
        // When the column mail is requested
        ModifTableStockage modifTableStockage = new ModifTableStockage(arg0);
        TableStockage colonneMail = modifTableStockage.colonneMail();
        
        // Then the column mail should have 87 rows
        assertEquals(87, colonneMail.getRowCount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAjouterColonneThrowsArrayIndexOutOfBoundsException() throws Throwable  {
        // rollbacked to evosuite
        TableStockage arg0 = new TableStockage();
        ModifTableStockage modifTableStockage = new ModifTableStockage(arg0);
        modifTableStockage.ajouterColonne("Etat", (Class<?>) null);
        // Undeclared exception!
        try { 
          modifTableStockage.ajouterColonne("Nom_Personne", (Class<?>) null);
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // no message in exception (getMessage() returned null)
           //
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testColonneMailReturningTableStockageWhereGetRowCountIsZero() throws Throwable  {
        // Create a new TableStockage object
        TableStockage stockage = new TableStockage();
        
        // Create a ModifTableStockage object with the previous created TableStockage as argument
        ModifTableStockage modification = new ModifTableStockage(stockage);
        
        // Get the column "mail" from the ModifTableStockage object
        TableStockage colonneMail = modification.colonneMail();
        
        // Check that the column has 1 row and 0 columns
        assertEquals(1, colonneMail.getColumnCount());
        assertEquals(0, colonneMail.getRowCount());
    }
  }
  