/*
 * This file was automatically generated by EvoSuite
 * Wed Sep 19 19:21:42 GMT 2018
 */

package uk.ac.sanger.artemis.components;

import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import javax.swing.JFrame;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
import uk.ac.sanger.artemis.components.FileDialogEntrySource;
import uk.ac.sanger.artemis.sequence.Bases;
import uk.ac.sanger.artemis.util.InputStreamProgressListener;
import java.awt.HeadlessException;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = false, useJEE = true) 
public class FileDialogEntrySource_ESTest extends FileDialogEntrySource_ESTest_scaffolding {

  @Test(timeout = 4000)
  public void test0()  throws Throwable  {
      JFrame jFrame0 = mock(JFrame.class, new ViolatedAssumptionAnswer());
      InputStreamProgressListener inputStreamProgressListener0 = mock(InputStreamProgressListener.class, new ViolatedAssumptionAnswer());
      doReturn((String) null).when(inputStreamProgressListener0).toString();
      FileDialogEntrySource fileDialogEntrySource0 = new FileDialogEntrySource(jFrame0, inputStreamProgressListener0);
      fileDialogEntrySource0.getInputStreamProgressListener();
  }

  @Test(timeout = 4000)
  public void test1()  throws Throwable  {
      JFrame jFrame0 = mock(JFrame.class, new ViolatedAssumptionAnswer());
      InputStreamProgressListener inputStreamProgressListener0 = mock(InputStreamProgressListener.class, new ViolatedAssumptionAnswer());
      FileDialogEntrySource fileDialogEntrySource0 = new FileDialogEntrySource(jFrame0, inputStreamProgressListener0);
      fileDialogEntrySource0.getSourceName();
  }

  @Test(timeout = 4000)
  public void test2()  throws Throwable  {
      JFrame jFrame0 = mock(JFrame.class, new ViolatedAssumptionAnswer());
      FileDialogEntrySource fileDialogEntrySource0 = new FileDialogEntrySource(jFrame0, (InputStreamProgressListener) null);
      fileDialogEntrySource0.getInputStreamProgressListener();
  }

  @Test(timeout = 4000)
  public void test3()  throws Throwable  {
      JFrame jFrame0 = mock(JFrame.class, new ViolatedAssumptionAnswer());
      InputStreamProgressListener inputStreamProgressListener0 = mock(InputStreamProgressListener.class, new ViolatedAssumptionAnswer());
      FileDialogEntrySource fileDialogEntrySource0 = new FileDialogEntrySource(jFrame0, inputStreamProgressListener0);
      // Undeclared exception!
      try { 
        fileDialogEntrySource0.getEntry(false);
        fail("Expecting exception: HeadlessException");
      
      } catch(HeadlessException e) {
         
      }
  }

  @Test(timeout = 4000)
  public void test4()  throws Throwable  {
      JFrame jFrame0 = mock(JFrame.class, new ViolatedAssumptionAnswer());
      InputStreamProgressListener inputStreamProgressListener0 = mock(InputStreamProgressListener.class, new ViolatedAssumptionAnswer());
      FileDialogEntrySource fileDialogEntrySource0 = new FileDialogEntrySource(jFrame0, inputStreamProgressListener0);
      fileDialogEntrySource0.isFullEntrySource();
  }

  @Test(timeout = 4000)
  public void test5()  throws Throwable  {
      JFrame jFrame0 = mock(JFrame.class, new ViolatedAssumptionAnswer());
      FileDialogEntrySource fileDialogEntrySource0 = new FileDialogEntrySource(jFrame0, (InputStreamProgressListener) null);
      Bases bases0 = mock(Bases.class, new ViolatedAssumptionAnswer());
      // Undeclared exception!
      try { 
        fileDialogEntrySource0.getEntry(bases0, false);
        fail("Expecting exception: HeadlessException");
      
      } catch(HeadlessException e) {
         
      }
  }
}
