Exemplo n.º 1
0
 @SuppressWarnings("unchecked")
 @Test
 public void drawsBlack() throws Exception {
   arrow.paint(graphics);
   InOrder inOrder = inOrder(graphics);
   inOrder.verify(graphics).setColor(RGBColor.Black);
   inOrder.verify(graphics).drawPolyline(any(List.class));
 }
Exemplo n.º 2
0
 @SuppressWarnings("unchecked")
 @Test
 public void drawsWide() throws Exception {
   arrow.paint(graphics);
   InOrder inOrder = inOrder(graphics);
   inOrder.verify(graphics).setStrokeWidth(new Width(6));
   inOrder.verify(graphics).drawPolyline(any(List.class));
 }
Exemplo n.º 3
0
 @Test
 public void movesPoints() throws Exception {
   arrow.moveBy(1, 2);
   arrow.paint(graphics);
   verifyPolylineWith(new Coordinate(18, 8));
 }
Exemplo n.º 4
0
 @Test
 public void hasDotAtBottom() throws Exception {
   arrow.paint(graphics);
   verify(graphics).fill(new TransformedShape(new Circle(17, 6, 12)));
 }
Exemplo n.º 5
0
 @Test
 public void connectsDots() throws Exception {
   arrow.paint(graphics);
   verifyPolylineWith(new Coordinate(17, 6));
 }
Exemplo n.º 6
0
 @Before
 public void setUp() throws Exception {
   arrow.addPoint(17, 6);
   arrow.addPoint(6, 10);
 }