1 /* 2 * This file was automatically generated by EvoSuite 3 * Fri Jan 12 11:22:15 GMT 2018 4 */ 5 6 package uk.ac.sanger.artemis.components.alignment; 7 8 import org.junit.Test; 9 import static org.junit.Assert.*; 10 import static org.evosuite.runtime.EvoAssertions.*; 11 import htsjdk.samtools.SAMSequenceDictionary; 12 import htsjdk.variant.vcf.VCFHeader; 13 import htsjdk.variant.vcf.VCFHeaderLine; 14 import java.awt.BasicStroke; 15 import java.awt.Color; 16 import java.awt.Container; 17 import java.awt.HeadlessException; 18 import java.awt.SystemColor; 19 import java.nio.charset.Charset; 20 import java.util.ArrayList; 21 import java.util.List; 22 import java.util.Set; 23 import javax.swing.JLayer; 24 import javax.swing.JPanel; 25 import javax.swing.tree.DefaultTreeCellRenderer; 26 import org.evosuite.runtime.EvoRunner; 27 import org.evosuite.runtime.EvoRunnerParameters; 28 import org.junit.runner.RunWith; 29 import uk.ac.sanger.artemis.components.alignment.LineAttributes; 30 31 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) 32 public class LineAttributes_ESTest extends LineAttributes_ESTest_scaffolding { 33 34 @Test(timeout = 4000) test00()35 public void test00() throws Throwable { 36 List<String> list0 = SAMSequenceDictionary.DEFAULT_DICTIONARY_EQUAL_TAG; 37 LineAttributes[] lineAttributesArray0 = new LineAttributes[2]; 38 // Undeclared exception! 39 try { 40 LineAttributes.configurePlots(list0, lineAttributesArray0, (JPanel) null); 41 fail("Expecting exception: NullPointerException"); 42 43 } catch(NullPointerException e) { 44 // 45 // no message in exception (getMessage() returned null) 46 // 47 verifyException("uk.ac.sanger.artemis.components.alignment.LineAttributes", e); 48 } 49 } 50 51 @Test(timeout = 4000) test01()52 public void test01() throws Throwable { 53 LineAttributes lineAttributes0 = new LineAttributes((Color) null); 54 lineAttributes0.getLineColour(); 55 assertEquals("Open", lineAttributes0.getPlotType()); 56 } 57 58 @Test(timeout = 4000) test02()59 public void test02() throws Throwable { 60 DefaultTreeCellRenderer defaultTreeCellRenderer0 = new DefaultTreeCellRenderer(); 61 Color color0 = defaultTreeCellRenderer0.getTextNonSelectionColor(); 62 LineAttributes lineAttributes0 = new LineAttributes(color0); 63 lineAttributes0.getLineColour(); 64 assertEquals("Open", lineAttributes0.getPlotType()); 65 } 66 67 @Test(timeout = 4000) test03()68 public void test03() throws Throwable { 69 Color color0 = Color.RED; 70 LineAttributes lineAttributes0 = new LineAttributes(color0); 71 lineAttributes0.getLineColour(); 72 assertEquals("Open", lineAttributes0.getPlotType()); 73 } 74 75 @Test(timeout = 4000) test04()76 public void test04() throws Throwable { 77 // Undeclared exception! 78 try { 79 LineAttributes.init((-2241)); 80 fail("Expecting exception: NegativeArraySizeException"); 81 82 } catch(NegativeArraySizeException e) { 83 // 84 // no message in exception (getMessage() returned null) 85 // 86 verifyException("uk.ac.sanger.artemis.components.alignment.LineAttributes", e); 87 } 88 } 89 90 @Test(timeout = 4000) test05()91 public void test05() throws Throwable { 92 String[] stringArray0 = new String[0]; 93 LineAttributes.PLOT_TYPES = stringArray0; 94 // Undeclared exception! 95 try { 96 LineAttributes.init(44); 97 fail("Expecting exception: ArrayIndexOutOfBoundsException"); 98 99 } catch(ArrayIndexOutOfBoundsException e) { 100 // 101 // 0 102 // 103 verifyException("uk.ac.sanger.artemis.components.alignment.LineAttributes", e); 104 } 105 } 106 107 @Test(timeout = 4000) test06()108 public void test06() throws Throwable { 109 SystemColor systemColor0 = SystemColor.controlShadow; 110 LineAttributes lineAttributes0 = new LineAttributes(systemColor0); 111 BasicStroke basicStroke0 = new BasicStroke(0.0F); 112 lineAttributes0.setStroke(basicStroke0); 113 VCFHeader vCFHeader0 = new VCFHeader(); 114 Set<VCFHeaderLine> set0 = vCFHeader0.getMetaDataInSortedOrder(); 115 Charset charset0 = Charset.defaultCharset(); 116 Set<String> set1 = charset0.aliases(); 117 VCFHeader vCFHeader1 = new VCFHeader(set0, set1); 118 ArrayList<String> arrayList0 = vCFHeader1.getSampleNamesInOrder(); 119 LineAttributes[] lineAttributesArray0 = new LineAttributes[3]; 120 lineAttributesArray0[0] = lineAttributes0; 121 JPanel jPanel0 = new JPanel(true); 122 // Undeclared exception! 123 try { 124 LineAttributes.configurePlots(arrayList0, lineAttributesArray0, jPanel0); 125 fail("Expecting exception: IllegalArgumentException"); 126 127 } catch(IllegalArgumentException e) { 128 // 129 // invalid range properties 130 // 131 verifyException("javax.swing.DefaultBoundedRangeModel", e); 132 } 133 } 134 135 @Test(timeout = 4000) test07()136 public void test07() throws Throwable { 137 Color color0 = Color.red; 138 LineAttributes lineAttributes0 = new LineAttributes(color0); 139 BasicStroke basicStroke0 = lineAttributes0.getStroke(); 140 assertEquals(1.0F, basicStroke0.getLineWidth(), 0.01F); 141 assertEquals("Open", lineAttributes0.getPlotType()); 142 } 143 144 @Test(timeout = 4000) test08()145 public void test08() throws Throwable { 146 Color color0 = new Color(44, true); 147 LineAttributes lineAttributes0 = new LineAttributes(color0); 148 lineAttributes0.getLineColour(); 149 assertEquals("Open", lineAttributes0.getPlotType()); 150 } 151 152 @Test(timeout = 4000) test09()153 public void test09() throws Throwable { 154 DefaultTreeCellRenderer defaultTreeCellRenderer0 = new DefaultTreeCellRenderer(); 155 Color color0 = defaultTreeCellRenderer0.getTextNonSelectionColor(); 156 LineAttributes lineAttributes0 = new LineAttributes(color0); 157 List<String> list0 = SAMSequenceDictionary.DEFAULT_DICTIONARY_EQUAL_TAG; 158 LineAttributes[] lineAttributesArray0 = new LineAttributes[5]; 159 lineAttributesArray0[0] = lineAttributes0; 160 lineAttributesArray0[1] = lineAttributes0; 161 JLayer<Container> jLayer0 = new JLayer<Container>(defaultTreeCellRenderer0); 162 JPanel jPanel0 = jLayer0.createGlassPane(); 163 // Undeclared exception! 164 try { 165 LineAttributes.configurePlots(list0, lineAttributesArray0, jPanel0); 166 fail("Expecting exception: HeadlessException"); 167 168 } catch(HeadlessException e) { 169 } 170 } 171 172 @Test(timeout = 4000) test10()173 public void test10() throws Throwable { 174 LineAttributes[] lineAttributesArray0 = LineAttributes.init(153); 175 assertNotNull(lineAttributesArray0); 176 } 177 178 @Test(timeout = 4000) test11()179 public void test11() throws Throwable { 180 LineAttributes[] lineAttributesArray0 = LineAttributes.init(1); 181 assertNotNull(lineAttributesArray0); 182 } 183 184 @Test(timeout = 4000) test12()185 public void test12() throws Throwable { 186 LineAttributes[] lineAttributesArray0 = LineAttributes.init(0); 187 ArrayList<String> arrayList0 = new ArrayList<String>(); 188 arrayList0.add("Select"); 189 // Undeclared exception! 190 try { 191 LineAttributes.configurePlots(arrayList0, lineAttributesArray0, (JPanel) null); 192 fail("Expecting exception: ArrayIndexOutOfBoundsException"); 193 194 } catch(ArrayIndexOutOfBoundsException e) { 195 // 196 // 0 197 // 198 verifyException("uk.ac.sanger.artemis.components.alignment.LineAttributes", e); 199 } 200 } 201 202 @Test(timeout = 4000) test13()203 public void test13() throws Throwable { 204 LineAttributes lineAttributes0 = new LineAttributes((Color) null); 205 lineAttributes0.setStroke((BasicStroke) null); 206 lineAttributes0.getStroke(); 207 assertEquals("Open", lineAttributes0.getPlotType()); 208 } 209 210 @Test(timeout = 4000) test14()211 public void test14() throws Throwable { 212 BasicStroke[] basicStrokeArray0 = LineAttributes.getStrokes(); 213 assertNotNull(basicStrokeArray0); 214 } 215 216 @Test(timeout = 4000) test15()217 public void test15() throws Throwable { 218 LineAttributes lineAttributes0 = new LineAttributes((Color) null); 219 lineAttributes0.setLineColour((Color) null); 220 assertEquals("Open", lineAttributes0.getPlotType()); 221 } 222 223 @Test(timeout = 4000) test16()224 public void test16() throws Throwable { 225 LineAttributes lineAttributes0 = new LineAttributes((Color) null); 226 String string0 = lineAttributes0.getPlotType(); 227 assertEquals("Open", string0); 228 } 229 } 230