/* * This file was automatically generated by EvoSuite * Fri Jan 12 12:39:39 GMT 2018 */ package uk.ac.sanger.artemis.components.genebuilder; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.awt.datatransfer.Clipboard; import java.awt.event.MouseEvent; import java.io.IOException; import java.util.List; import javax.swing.DebugGraphics; import org.apache.batik.dom.GenericDOMImplementation; import org.apache.batik.dom.GenericDocument; import org.apache.batik.dom.GenericDocumentType; import org.apache.batik.svggen.DefaultExtensionHandler; import org.apache.batik.svggen.DefaultImageHandler; import org.apache.batik.svggen.ImageHandlerBase64Encoder; import org.apache.batik.svggen.SVGGeneratorContext; import org.apache.batik.svggen.SVGGraphics2D; import org.biojava.bio.seq.NewSimpleAssembly; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.w3c.dom.DOMImplementation; import uk.ac.sanger.artemis.FeatureVector; import uk.ac.sanger.artemis.Selection; import uk.ac.sanger.artemis.chado.ClusterLazyQualifierValue; import uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel; import uk.ac.sanger.artemis.io.BlastEntryInformation; import uk.ac.sanger.artemis.io.ChadoCanonicalGene; import uk.ac.sanger.artemis.io.Feature; import uk.ac.sanger.artemis.io.GFFStreamFeature; import uk.ac.sanger.artemis.io.GenbankStreamFeature; import uk.ac.sanger.artemis.io.IndexedGFFDocumentEntry; import uk.ac.sanger.artemis.io.Key; import uk.ac.sanger.artemis.io.Qualifier; import uk.ac.sanger.artemis.io.QualifierLazyLoading; import uk.ac.sanger.artemis.io.QualifierVector; import uk.ac.sanger.artemis.util.Document; import uk.ac.sanger.artemis.util.StringVector; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class ProteinMapPanel_ESTest extends ProteinMapPanel_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { ChadoCanonicalGene chadoCanonicalGene0 = new ChadoCanonicalGene(); chadoCanonicalGene0.setSrcfeature_id(0); chadoCanonicalGene0.getTranscriptFeatureFromName("R"); Clipboard clipboard0 = new Clipboard("R"); Selection selection0 = new Selection(clipboard0); ProteinMapPanel proteinMapPanel0 = new ProteinMapPanel((Feature) null, chadoCanonicalGene0, selection0); // Undeclared exception! try { proteinMapPanel0.getToolTipText((MouseEvent) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test01() throws Throwable { GenbankStreamFeature genbankStreamFeature0 = new GenbankStreamFeature(); ChadoCanonicalGene chadoCanonicalGene0 = new ChadoCanonicalGene(); Clipboard clipboard0 = new Clipboard("Filter minimum score must be less than maximum score"); Selection selection0 = new Selection(clipboard0); ProteinMapPanel proteinMapPanel0 = new ProteinMapPanel(genbankStreamFeature0, chadoCanonicalGene0, selection0); selection0.getAllSegments(); MouseEvent mouseEvent0 = new MouseEvent(proteinMapPanel0, 4, 4, 4, 4, (-678), 4, true); MouseEvent.getMouseModifiersText(58); proteinMapPanel0.getToolTipText(mouseEvent0); GenericDocumentType genericDocumentType0 = new GenericDocumentType(")Q5S0sxmu!^O", "", (String) null); GenericDocument genericDocument0 = new GenericDocument(genericDocumentType0, (DOMImplementation) null); SVGGeneratorContext sVGGeneratorContext0 = SVGGeneratorContext.createDefault(genericDocument0); SVGGraphics2D sVGGraphics2D0 = new SVGGraphics2D(sVGGeneratorContext0, true); SVGGraphics2D sVGGraphics2D1 = new SVGGraphics2D(sVGGraphics2D0); proteinMapPanel0.drawPrediction(genbankStreamFeature0, sVGGraphics2D1, 0, 0, 1406, 1368, (String[]) null); assertFalse(proteinMapPanel0.isFocusCycleRoot()); } @Test(timeout = 4000) public void test02() throws Throwable { BlastEntryInformation blastEntryInformation0 = new BlastEntryInformation(); Key key0 = Key.CDS; blastEntryInformation0.getValidQualifierNames(key0); Qualifier qualifier0 = new Qualifier("61pi", (StringVector) null); ProteinMapPanel.isProteinMapElement(qualifier0); ChadoCanonicalGene chadoCanonicalGene0 = new ChadoCanonicalGene(); chadoCanonicalGene0.getTranscriptFeatureFromName("61pi"); Clipboard clipboard0 = new Clipboard("61pi"); Selection selection0 = new Selection(clipboard0); ProteinMapPanel proteinMapPanel0 = new ProteinMapPanel((Feature) null, chadoCanonicalGene0, selection0); GenericDocumentType genericDocumentType0 = new GenericDocumentType("polypeptide_domain", "polypeptide_domain", "Xw`Mme {~* 3zo;P|74"); GenericDOMImplementation genericDOMImplementation0 = new GenericDOMImplementation(); GenericDocument genericDocument0 = new GenericDocument(genericDocumentType0, genericDOMImplementation0); SVGGraphics2D sVGGraphics2D0 = new SVGGraphics2D(genericDocument0); QualifierLazyLoading qualifierLazyLoading0 = new QualifierLazyLoading("", (List) null); // Undeclared exception! try { proteinMapPanel0.drawGPIArrow(sVGGraphics2D0, qualifierLazyLoading0, (short)4, (short)8, 1048576, (short)1); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test03() throws Throwable { GenbankStreamFeature genbankStreamFeature0 = new GenbankStreamFeature(); ChadoCanonicalGene chadoCanonicalGene0 = new ChadoCanonicalGene(); Clipboard clipboard0 = new Clipboard(""); Selection selection0 = new Selection(clipboard0); ProteinMapPanel proteinMapPanel0 = new ProteinMapPanel(genbankStreamFeature0, chadoCanonicalGene0, selection0); GenericDocumentType genericDocumentType0 = new GenericDocumentType("polypeptide_domain", "", ""); GenericDocument genericDocument0 = new GenericDocument(genericDocumentType0, (DOMImplementation) null); SVGGeneratorContext sVGGeneratorContext0 = SVGGeneratorContext.createDefault(genericDocument0); SVGGraphics2D sVGGraphics2D0 = new SVGGraphics2D(sVGGeneratorContext0, true); SVGGraphics2D sVGGraphics2D1 = new SVGGraphics2D(sVGGraphics2D0); String[] stringArray0 = new String[9]; stringArray0[0] = "polypeptide_domain"; stringArray0[1] = ""; stringArray0[2] = "ISO-8859-1"; stringArray0[3] = "ISO-8859-1"; stringArray0[4] = "ISO-8859-1"; stringArray0[5] = "ISO-8859-1"; stringArray0[6] = "/~Isj|R'Cxl"; stringArray0[7] = ""; stringArray0[8] = "ISO-8859-1"; proteinMapPanel0.drawPrediction(genbankStreamFeature0, sVGGraphics2D1, (short)4, 3, 3, 583, stringArray0); assertEquals(3, SVGGraphics2D.DEFAULT_MAX_GC_OVERRIDES); } @Test(timeout = 4000) public void test04() throws Throwable { ChadoCanonicalGene chadoCanonicalGene0 = new ChadoCanonicalGene(); ProteinMapPanel proteinMapPanel0 = new ProteinMapPanel((Feature) null, chadoCanonicalGene0, (Selection) null); GenericDocumentType genericDocumentType0 = new GenericDocumentType("polypeptide_domain", "polypeptide_domain", "polypeptide_domain"); GenericDOMImplementation genericDOMImplementation0 = new GenericDOMImplementation(); GenericDocument genericDocument0 = new GenericDocument(genericDocumentType0, genericDOMImplementation0); ImageHandlerBase64Encoder imageHandlerBase64Encoder0 = new ImageHandlerBase64Encoder(); DefaultExtensionHandler defaultExtensionHandler0 = new DefaultExtensionHandler(); SVGGraphics2D sVGGraphics2D0 = new SVGGraphics2D(genericDocument0, imageHandlerBase64Encoder0, defaultExtensionHandler0, false); DebugGraphics debugGraphics0 = new DebugGraphics(sVGGraphics2D0); // Undeclared exception! try { proteinMapPanel0.paintComponent(debugGraphics0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // javax.swing.DebugGraphics cannot be cast to java.awt.Graphics2D // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test05() throws Throwable { Clipboard clipboard0 = new Clipboard(""); Selection selection0 = new Selection(clipboard0); ProteinMapPanel proteinMapPanel0 = new ProteinMapPanel((Feature) null, (ChadoCanonicalGene) null, selection0); GenericDocumentType genericDocumentType0 = new GenericDocumentType("polypeptide_domain", "cytoplasm_location", "transmembrane_polypeptide_region"); GenericDOMImplementation genericDOMImplementation0 = new GenericDOMImplementation(); GenericDocument genericDocument0 = new GenericDocument(genericDocumentType0, genericDOMImplementation0); SVGGraphics2D sVGGraphics2D0 = new SVGGraphics2D(genericDocument0); SVGGraphics2D sVGGraphics2D1 = new SVGGraphics2D(sVGGraphics2D0); String[] stringArray0 = new String[3]; stringArray0[0] = "transmembrane_polypeptide_region"; stringArray0[1] = "ISO-8859-1"; stringArray0[2] = "ISO-8859-1"; // Undeclared exception! try { proteinMapPanel0.drawPrediction((Feature) null, sVGGraphics2D1, 0, (short)8, (short)16, (short)1, stringArray0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test06() throws Throwable { ChadoCanonicalGene chadoCanonicalGene0 = new ChadoCanonicalGene(); FeatureVector featureVector0 = new FeatureVector(); StringVector stringVector0 = uk.ac.sanger.artemis.Feature.getAllQualifierNames(featureVector0); chadoCanonicalGene0.containsTranscript(stringVector0); ProteinMapPanel proteinMapPanel0 = new ProteinMapPanel((Feature) null, chadoCanonicalGene0, (Selection) null); GenericDocumentType genericDocumentType0 = new GenericDocumentType("polypeptide_domain", "polypeptide_domain", "polypeptide_domain"); DOMImplementation dOMImplementation0 = GenericDOMImplementation.getDOMImplementation(); GenericDocument genericDocument0 = new GenericDocument(genericDocumentType0, dOMImplementation0); DefaultImageHandler defaultImageHandler0 = new DefaultImageHandler(); DefaultExtensionHandler defaultExtensionHandler0 = new DefaultExtensionHandler(); SVGGraphics2D sVGGraphics2D0 = new SVGGraphics2D(genericDocument0, defaultImageHandler0, defaultExtensionHandler0, true); SVGGraphics2D sVGGraphics2D1 = new SVGGraphics2D(sVGGraphics2D0); // Undeclared exception! try { proteinMapPanel0.drawDomain((Feature) null, sVGGraphics2D1, (short)4, (-2039), (short)1, (short)1); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test07() throws Throwable { // Undeclared exception! try { ProteinMapPanel.getProteinMapQualifiers((uk.ac.sanger.artemis.Feature) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test08() throws Throwable { // Undeclared exception! try { ProteinMapPanel.getProteinsWithProteinMapElement((GFFStreamFeature) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test09() throws Throwable { ClusterLazyQualifierValue clusterLazyQualifierValue0 = new ClusterLazyQualifierValue(":vcma-^;@5YIzf", ":vcma-^;@5YIzf", (GFFStreamFeature) null); QualifierLazyLoading qualifierLazyLoading0 = new QualifierLazyLoading(":vcma-^;@5YIzf", clusterLazyQualifierValue0); boolean boolean0 = ProteinMapPanel.isProteinMapElement(qualifierLazyLoading0); assertFalse(boolean0); } @Test(timeout = 4000) public void test10() throws Throwable { QualifierVector qualifierVector0 = new QualifierVector(); qualifierVector0.getQualifierByName(""); // Undeclared exception! try { ProteinMapPanel.isProteinMapElement((Qualifier) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("uk.ac.sanger.artemis.components.genebuilder.ProteinMapPanel", e); } } @Test(timeout = 4000) public void test11() throws Throwable { Key key0 = Key.CDS; NewSimpleAssembly newSimpleAssembly0 = null; try { newSimpleAssembly0 = new NewSimpleAssembly("", ""); fail("Expecting exception: NoClassDefFoundError"); } catch(NoClassDefFoundError e) { // // Could not initialize class org.biojava.bio.seq.DNATools // verifyException("org.biojava.bio.seq.impl.NewAssembledSymbolList", e); } } @Test(timeout = 4000) public void test12() throws Throwable { Document document0 = null; IndexedGFFDocumentEntry indexedGFFDocumentEntry0 = new IndexedGFFDocumentEntry((Document) null); } @Test(timeout = 4000) public void test13() throws Throwable { String string0 = "query"; GFFStreamFeature gFFStreamFeature0 = null; try { gFFStreamFeature0 = new GFFStreamFeature("query"); fail("Expecting exception: IOException"); } catch(Throwable e) { // // invalid GFF line: 8 fields needed (got 1 fields) from: query // verifyException("uk.ac.sanger.artemis.io.GFFStreamFeature", e); } } }