package com.explodingpixels.macwidgets; import com.explodingpixels.data.Rating; import javax.swing.JFrame; import javax.swing.SwingUtilities; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.awt.BorderLayout; public class DRatingComponentTest { @Before public void setUp() throws Exception { } @Test public void doTest() throws Exception { SwingUtilities.invokeLater(new Runnable() { public void run() { RatingComponent ratingComponent = new RatingComponent(Rating.FOUR_STARS); JFrame frame = new JFrame(); frame.add(ratingComponent.getComponent(), BorderLayout.CENTER); frame.setSize(150, 100); frame.setLocationRelativeTo(null); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setVisible(true); } }); } @After public void tearDown() throws Exception { } }