public void testExpanded() {
   Fixture.fakePhase(PhaseId.PROCESS_ACTION);
   Display display = new Display();
   Composite shell = new Shell(display, SWT.NONE);
   Twistie twistie = new Twistie(shell, SWT.NONE);
   twistie.setExpanded(true);
   assertTrue(twistie.isExpanded());
 }
 public void testComputeSize() {
   Fixture.fakePhase(PhaseId.PROCESS_ACTION);
   Display display = new Display();
   Composite shell = new Shell(display, SWT.NONE);
   Twistie twistie = new Twistie(shell, SWT.NONE);
   Point expected = new Point(11, 11);
   assertEquals(expected, twistie.computeSize(SWT.DEFAULT, SWT.DEFAULT));
   // fixed size
   expected = new Point(11, 11);
   assertEquals(expected, twistie.computeSize(50, 50));
 }
 public void testColors() {
   Fixture.fakePhase(PhaseId.PROCESS_ACTION);
   Display display = new Display();
   Composite shell = new Shell(display, SWT.NONE);
   Twistie twistie = new Twistie(shell, SWT.NONE);
   Color decorationColor = Graphics.getColor(255, 0, 0);
   twistie.setDecorationColor(decorationColor);
   assertEquals(decorationColor, twistie.getDecorationColor());
   Color hoverColor = Graphics.getColor(0, 255, 0);
   twistie.setHoverDecorationColor(hoverColor);
   assertEquals(hoverColor, twistie.getHoverDecorationColor());
 }