Source
stringclasses
1 value
Date
int32
2.01k
2.01k
Text
stringlengths
3
15.9M
Token_count
int32
1
2.44M
github-java-corpus
2,012
package org.uispec4j.interception.ui; import org.uispec4j.interception.toolkit.Empty; import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicTextPaneUI; import java.awt.*; ///CLOVER:OFF public class UISpecTextPaneUI extends BasicTextPaneUI { public static ComponentUI createU...
203
github-java-corpus
2,012
package org.uispec4j.interception.ui; import org.uispec4j.interception.toolkit.Empty; import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicPasswordFieldUI; import java.awt.*; ///CLOVER:OFF public class UISpecPasswordFieldUI extends BasicPasswordFieldUI { public static Comp...
199
github-java-corpus
2,012
package org.uispec4j.interception.ui; import org.uispec4j.interception.toolkit.Empty; import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicRadioButtonUI; import java.awt.*; ///CLOVER:OFF public class UISpecRadioButtonUI extends BasicRadioButtonUI { public static ComponentU...
175
github-java-corpus
2,012
package org.uispec4j.interception.ui; import org.uispec4j.interception.toolkit.Empty; import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicSpinnerUI; import java.awt.*; ///CLOVER:OFF public class UISpecSpinnerUI extends BasicSpinnerUI { public static ComponentUI createUI(J...
175
github-java-corpus
2,012
package org.uispec4j.interception.ui; import org.uispec4j.interception.toolkit.Empty; import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicTextFieldUI; import java.awt.*; ///CLOVER:OFF public class UISpecTextFieldUI extends BasicTextFieldUI { public static ComponentUI crea...
199
github-java-corpus
2,012
package org.uispec4j.interception; import org.uispec4j.Trigger; import org.uispec4j.UISpec4J; import org.uispec4j.Window; import org.uispec4j.assertion.UISpecAssert; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.interception.handlers.*; import org.uispec4j.interception.toolkit.UISpecD...
2,681
github-java-corpus
2,012
package org.uispec4j.interception; import org.uispec4j.TextBox; import org.uispec4j.Trigger; import org.uispec4j.UIComponent; import org.uispec4j.Window; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.interception.handlers.InterceptionHandler; import java.util.ArrayList; import java.u...
733
github-java-corpus
2,012
package org.uispec4j.interception.handlers; import org.uispec4j.Window; public abstract class AbstractInterceptionHandlerDecorator implements InterceptionHandler { private InterceptionHandler innerHandler; protected AbstractInterceptionHandlerDecorator(InterceptionHandler innerHandler) { this.innerHandler =...
84
github-java-corpus
2,012
package org.uispec4j.interception.handlers; import org.uispec4j.Window; import org.uispec4j.interception.WindowInterceptor; /** * Internal interface for window handlers used by {@link WindowInterceptor}. */ public interface InterceptionHandler { /** * Called to process a modal dialog when it is shown. */ ...
77
github-java-corpus
2,012
package org.uispec4j.interception.handlers; import org.uispec4j.Window; import org.uispec4j.assertion.testlibrairies.AssertAdapter; public class ModalInterceptionCheckerHandler extends AbstractInterceptionHandlerDecorator { private boolean shouldBeModal; public ModalInterceptionCheckerHandler(InterceptionHandler...
201
github-java-corpus
2,012
package org.uispec4j.interception.handlers; import org.uispec4j.Window; import org.uispec4j.utils.ComponentUtils; import org.uispec4j.utils.ThreadManager; public class ClosedInterceptionDetectionHandler extends AbstractInterceptionHandlerDecorator { public static final String MODAL_DIALOG_NOT_CLOSED_ERROR_MESSAGE =...
613
github-java-corpus
2,012
package org.uispec4j.interception.handlers; import org.uispec4j.Window; import org.uispec4j.utils.ExceptionContainer; import org.uispec4j.utils.ThreadManager; public class NewThreadInterceptionHandlerDecorator extends AbstractInterceptionHandlerDecorator { private ExceptionContainer exceptionContainer = new Excepti...
246
github-java-corpus
2,012
package org.uispec4j.interception.handlers; import org.uispec4j.Window; import org.uispec4j.assertion.testlibrairies.AssertAdapter; public class ShownInterceptionDetectionHandler extends AbstractInterceptionHandlerDecorator { public static final String NO_WINDOW_WAS_SHOWN_ERROR_MESSAGE = "No window was shown (timeo...
263
github-java-corpus
2,012
package org.uispec4j.interception.handlers; import org.uispec4j.Window; public class ShownInterceptionCollectorHandler implements InterceptionHandler { private Window window; public void process(Window window) { this.window = window; } public Window getWindow() { return window; } }
67
github-java-corpus
2,012
package org.uispec4j.interception.handlers; public class WindowNotClosedError extends Error { public WindowNotClosedError(String message) { super(message); } }
37
github-java-corpus
2,012
package org.uispec4j.interception; import org.uispec4j.*; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.UISpecAssert; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.interception.handlers.InterceptionHandler; import org.uispec4j.interception.toolkit.UISpecDispla...
537
github-java-corpus
2,012
package org.uispec4j.interception; import org.uispec4j.Trigger; import org.uispec4j.UISpecAdapter; import org.uispec4j.Window; import org.uispec4j.utils.MainClassTrigger; /** * Adapter that intercepts the window displayed by the main() of a given class.<p/> * This adapter keeps the reference of the intercepted wind...
218
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import java.util.*; public class ArrayUtils { public static String toString(Object[] objects) { StringBuffer buffer = new StringBuffer(); appendLine(buffer, objects, ","); return buffer.toString(); } public st...
1,454
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.xml.XmlEscape; import javax.swing.*; import java.util.Arrays; import java.util.List; import java.util.ArrayList; public class Utils { public static final String LINE_SEPARATOR = System.getProperty("line.sepa...
877
github-java-corpus
2,012
package org.uispec4j.utils; import java.io.PrintWriter; import java.io.StringWriter; /** * Simple log class used sporadically for debugging sessions */ ///CLOVER:OFF public class Log { private static LogWriter writer = new NullWriter(); public static final int THREAD_NAME_SIZE = 45; public static void reset(...
413
github-java-corpus
2,012
package org.uispec4j.utils; public interface Stringifier { String toString(Object obj); Stringifier NULL = new Stringifier() { public String toString(Object obj) { return obj.toString(); } }; }
48
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.interception.toolkit.Empty; import javax.swing.*; import java.awt.*; /** Use this to prevent Swing from painting your components during the tests. * This can speed up the execution of your tests. */ public class DummyRepaintManager extends RepaintManager { public s...
382
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.Button; import org.uispec4j.*; import org.uispec4j.MenuBar; import org.uispec4j.MenuItem; import org.uispec4j.Panel; import org.uispec4j.Window; import java.awt.Container; import java.awt.Component; import java.lang.reflect.Constructor; import java.util.HashMap; impor...
1,145
github-java-corpus
2,012
package org.uispec4j.utils; import javax.swing.*; import javax.swing.text.JTextComponent; import java.awt.*; /** * Miscellaneous utilities designed for internal use. */ public class ComponentUtils { public static boolean hasDisplayedName(Class componentClass) { return ((AbstractButton.class.isAssignableFrom(c...
340
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.Trigger; import java.lang.reflect.Method; public class MainClassTrigger implements Trigger { private Method main; private String[] args; public MainClassTrigger(Class mainClass, String... args) { this.args = args; try { main = mainClass.getMethod("...
140
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import java.awt.*; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Map; /** * Utility for checking colors given either hexa or "natural language" string descriptions....
1,465
github-java-corpus
2,012
package org.uispec4j.utils; public class UIComponentAnalyzer { public static Class[] getSwingClasses(Class uiComponentClass) { Class[] classes; try { classes = (Class[])uiComponentClass.getDeclaredField("SWING_CLASSES").get(null); if (classes == null) { throw new RuntimeException("Field '...
268
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.Key; import org.uispec4j.UIComponent; import javax.swing.*; import javax.swing.text.Document; import javax.swing.text.JTextComponent; import java.awt.*; import java.awt.event.KeyEvent; import static java.awt.event.KeyEvent.*; import java.awt.event.KeyListener; public c...
460
github-java-corpus
2,012
package org.uispec4j.utils; import java.util.ArrayList; import java.util.List; public class ThreadManager { private static ThreadManager manager = new ThreadManager(); private List<ManagedThread> threads = new ArrayList<ManagedThread>(); private long id = Long.MIN_VALUE + 1; public static ThreadManager getIn...
654
github-java-corpus
2,012
package org.uispec4j.utils; public class ExceptionContainer { private RuntimeException exception; private Error error; private StackTraceElement[] stackTraceElements; public ExceptionContainer() { } public ExceptionContainer(RuntimeException callerStack) { stackTraceElements = callerStack.getStackTra...
360
github-java-corpus
2,012
package org.uispec4j.utils; import java.awt.*; public abstract class ComponentColorChecker { public final static ComponentColorChecker FOREGROUND = new ComponentColorChecker() { public Color getColor(Component component) { return component.getForeground(); } }; public final static ComponentColorC...
125
github-java-corpus
2,012
package org.uispec4j.utils; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * Utility for checking date as String formatted by a date format. * By default, the date format u * * @see java.text.DateFormat */ public class DateUtils { pu...
233
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.Trigger; import org.uispec4j.interception.toolkit.UISpecDisplay; import javax.swing.*; import java.lang.reflect.InvocationTargetException; public class TriggerRunner { public static void runInCurrentThread(Trigger trigger) { try { trigger.run(); } c...
328
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import java.util.Date; public class Chrono { private Date startDate; public static Chrono start() { return new Chrono(); } private Chrono() { startDate = new Date(); } public void assertElapsedTimeLessThan(...
142
github-java-corpus
2,012
package org.uispec4j.utils; import org.uispec4j.Trigger; public class ThreadLauncherTrigger implements Trigger { private Thread[] threads; public ThreadLauncherTrigger(Thread... threads) { this.threads = threads; } public void run() throws Exception { for (Thread thread : threads) { thread.sta...
78
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.UISpecAssert; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.xml.XmlWriter; import javax.swing.*; import java.awt.*; /** * Wrapper for window components such as JFrame, JDialog, JInternalFra...
1,323
github-java-corpus
2,012
package org.uispec4j; /** * Thrown by UIComponents when a search cannot identify a single result. */ class ItemAmbiguityException extends RuntimeException { public ItemAmbiguityException(String searchedValue, String[] foundItems) { super(computeMessage(foundItems, searchedValue)); } private static String ...
171
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.finder.StringMatcher; import org.uispec4j.utils.ArrayUtils; import org.uispec4j.xml.XmlAssert; import org.uispec4j.xml.XmlWriter; import javax.swing.*; import java.awt.*; impo...
1,634
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import javax.swing.*; /** * Wrapper for JCheckBox components. */ public class CheckBox extends AbstractButton { public static final String TYPE_NAME = "checkBox"; public static final Class...
219
github-java-corpus
2,012
package org.uispec4j.finder; import java.awt.*; /** * Interface used for implementing component searching policies. * * @see org.uispec4j.Panel */ public interface ComponentMatcher { boolean matches(Component component); public static final ComponentMatcher ALL = new ComponentMatcher() { public boolean m...
78
github-java-corpus
2,012
package org.uispec4j.finder; import org.uispec4j.utils.ComponentUtils; import org.uispec4j.utils.Utils; import javax.swing.*; import java.awt.*; /** * Standard searching policies, implemented as {@link ComponentMatcher} objects. */ public class ComponentMatchers { /** * Matches components whose displayed nam...
1,117
github-java-corpus
2,012
package org.uispec4j.finder; import org.uispec4j.ComponentAmbiguityException; import org.uispec4j.ItemNotFoundException; import org.uispec4j.UIComponent; import org.uispec4j.utils.UIComponentFactory; import javax.swing.*; import java.awt.*; import java.util.ArrayList; import java.util.Collections; import java.util.Li...
1,192
github-java-corpus
2,012
package org.uispec4j.finder; /** * Miscellaneous utilities used by the component finding mechanism */ public class FinderUtils { private FinderUtils() { } public static StringMatcher[] getMatchers(String reference) { return new StringMatcher[]{StringMatcher.identity(reference), StringMatcher.substring(ref...
66
github-java-corpus
2,012
package org.uispec4j.finder; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * String matching policy used withing the component searching mechanism. * Three ready-to-use strategies are provided (identity/substring/regexp), * but you can provide your own by implementing this class. */ public a...
294
github-java-corpus
2,012
package org.uispec4j.finder; import org.uispec4j.utils.ArrayUtils; import org.uispec4j.utils.ComponentUtils; import java.awt.*; import java.util.List; class Messages { public static String computeAmbiguityMessage(Component[] matchingComponents, String type, String name) { String[] componentNames = new String[m...
430
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.utils.ArrayUtils; import javax.swing.*; /** * Wrapper for JMenuBar components.<p/> * A MenuBar is a container for top-level menu items represented by {@link MenuItem} compo...
530
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.finder.ComponentFinder; import org.uispec4j.finder.ComponentMatcher; import org.uispec4j.utils.UIComponentAnalyzer; import org.uispec4j.utils.UIComponentFactory; import javax....
4,496
github-java-corpus
2,012
package org.uispec4j; import sun.security.action.GetPropertyAction; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.util.HashMap; import java.util.Map; import java.security.AccessController; /** * Contants class defining keyboard keys. */ public final class Key { private static Map...
2,916
github-java-corpus
2,012
package org.uispec4j; /** * Interface for adapting a UISpec4J test suite to a given application. * * @see UISpecTestCase */ public interface UISpecAdapter { Window getMainWindow(); }
46
github-java-corpus
2,012
package org.uispec4j.xml; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.utils.Utils; public class EventLogger { private StringBuffer buffer = new StringBuffer(); private Log lastLog; public EventLogger() { reset(); } public void assertEquals(String expected) { as...
544
github-java-corpus
2,012
package org.uispec4j.xml; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import java.io.Read...
447
github-java-corpus
2,012
package org.uispec4j.xml; import org.xml.sax.Attributes; public interface Node { public Node getSubNode(String childName, Attributes xmlAttrs); public void setValue(String value); public void complete(); }
47
github-java-corpus
2,012
package org.uispec4j.xml; import org.xml.sax.Attributes; public class SilentNode implements Node { public static final SilentNode INSTANCE = new SilentNode(); private SilentNode() { } public Node getSubNode(String childName, Attributes xmlAttrs) throws RuntimeException { return this; } public void ...
84
github-java-corpus
2,012
package org.uispec4j.xml; import org.uispec4j.utils.Utils; import java.io.IOException; import java.io.Writer; public class XmlWriter { public static Tag startTag(Writer writer, String rootTag) { try { writer.write('<'); writer.write(rootTag); return new Tag(writer, NULL, rootTag); } ...
593
github-java-corpus
2,012
package org.uispec4j.xml; public class XmlEscape { private static final int AMP_CHARACTER = '&'; private static final int LT_CHARACTER = '<'; private static final int GT_CHARACTER = '>'; private static final int QUOT_CHARACTER = '"'; private static final int APOS_CHARACTER = '\''; private static final Str...
430
github-java-corpus
2,012
package org.uispec4j.xml; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.xml.sax.Attributes; import java.io.Reader; import java.io.StringReader; import java.util.*; public class XmlAssert { private XmlAssert() { // Static class } public static void assertEquivalent(String xmlA, St...
1,313
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.UISpecAssert; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.utils.Utils; import org.uispec4j.xml.XmlAssert; import javax.swing.*; import javax.swing.event.HyperlinkEvent; import javax.swing.e...
1,260
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import javax.swing.*; /** * Wrapper for JToggleButton components. */ public class ToggleButton extends AbstractButton { public static final String TYPE_NAME = "toggleButton"; public static...
210
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.interception.WindowInterceptor; /** * Interface for window interception triggers - UI interactions which display a window.<p> * Ready-to-use triggers are made available by several components such as Buttons or Menus. * * @see Button#triggerClick * @see MenuItem#triggerCl...
116
github-java-corpus
2,012
package org.uispec4j; import java.awt.*; /** * Performs a conversion between internal and tested cell values in a {@link Tree} component * * @see Tree#setCellValueConverter */ public interface TreeCellValueConverter { /** * Returns the textual representation of the given tree object * * @param rendere...
170
github-java-corpus
2,012
package org.uispec4j; import javax.swing.*; /** * Wrapper for JButton components. */ public class Button extends AbstractButton { public static final String TYPE_NAME = "button"; public static final Class[] SWING_CLASSES = {JButton.class}; private JButton jButton; public Button(JButton jButton) { supe...
109
github-java-corpus
2,012
package org.uispec4j; import javax.swing.*; import java.awt.*; /** * Default implementation for the TableCellValueConverter interface. * This converter returns the displayed value for JLabel and JComboBox components, and a Boolean * in the case of a JCheckBox. If another renderer type is used, it will returned the...
226
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import javax.swing.*; /** * Wrapper for JProgressBar components. */ public class ProgressBar extends AbstractUIComponent { public static final String TYPE_NAME = "progressBar"; public stat...
684
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.UISpecAssert; import org.uispec4j.assertion.testlibrairies.AssertAdapter; import org.uispec4j.finder.FinderUtils; import org.uispec4j.finder.StringMatcher; import org.uispec4j.utils.ArrayUtils; import org.uispec4j.xml.XmlWrite...
1,272
github-java-corpus
2,012
package org.uispec4j; import junit.framework.TestCase; import org.uispec4j.assertion.Assertion; import org.uispec4j.assertion.UISpecAssert; import org.uispec4j.interception.toolkit.UISpecDisplay; /** * UISpec4J-enabled TestCase class.<p> * Test cases derived from this class automatically set up the instanciation me...
1,543
github-java-corpus
2,012
package org.uispec4j.interception.toolkit; import sun.awt.ComponentFactory; import sun.awt.SunToolkit; import java.awt.*; import java.awt.datatransfer.Clipboard; import java.awt.dnd.*; import java.awt.dnd.peer.DragSourceContextPeer; import java.awt.event.AWTEventListener; import java.awt.im.InputMethodHighlight; impo...
2,362
github-java-corpus
2,012
package org.uispec4j.interception.toolkit; import sun.awt.CausedFocusEvent; import sun.awt.image.SunVolatileImage; import sun.java2d.pipe.Region; import javax.swing.*; import java.awt.*; import java.awt.event.PaintEvent; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.geom.Af...
6,290
github-java-corpus
2,012
package org.uispec4j.interception.toolkit; import sun.awt.ComponentFactory; import sun.awt.SunToolkit; import java.awt.*; import java.awt.datatransfer.Clipboard; import java.awt.dnd.*; import java.awt.dnd.peer.DragSourceContextPeer; import java.awt.event.AWTEventListener; import java.awt.im.InputMethodHighlight; impo...
2,011
github-java-corpus
2,012
package org.uispec4j.interception.toolkit; import sun.awt.image.SunVolatileImage; import javax.swing.*; import java.awt.*; import java.awt.event.PaintEvent; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import java.awt...
5,360
github-java-corpus
2,012
package org.uispec4j; import junit.framework.Assert; import org.uispec4j.utils.Utils; import java.awt.*; import java.util.Arrays; import java.util.Collection; import java.util.List; public class TestUtils { public static void assertUIComponentRefersTo(Component expectedComponent, UIComponent uiComponent) { Ass...
485
github-java-corpus
2,012
package org.uispec4j; import junit.framework.AssertionFailedError; import org.uispec4j.utils.AssertionFailureNotDetectedError; import org.uispec4j.utils.FileTestUtils; import org.uispec4j.utils.Functor; import org.uispec4j.utils.UIComponentFactory; import javax.swing.*; import javax.swing.event.HyperlinkEvent; import...
3,297
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.UIComponentFactory; import org.uispec4j.xml.EventLogger; import javax.swing.*; import java.awt.event.ActionEvent; public class MenuItemForJMenuTest extends MenuItemTestCase { public void testFactory() throws Exception { checkFactory(new JMenu(), MenuItem.class); ...
406
github-java-corpus
2,012
package org.uispec4j; import junit.framework.AssertionFailedError; import org.uispec4j.utils.AssertionFailureNotDetectedError; import org.uispec4j.xml.EventLogger; import org.uispec4j.xml.XmlAssert; import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; impo...
3,492
github-java-corpus
2,012
package org.uispec4j; import static org.uispec4j.DummySpinner.*; import javax.swing.*; import java.util.Calendar; public class DateSpinnerTest extends SpinnerTestCase { private DateSpinner dateSpinner; private SpinnerDateModel model; public DateSpinnerTest() throws Exception { model = DummySpinner.dateMod...
319
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.ArrayUtils; import org.uispec4j.utils.Functor; import org.uispec4j.utils.Utils; import org.uispec4j.xml.XmlAssert; import javax.swing.*; import java.util.ArrayList; import java.util.List; public class DesktopTest extends UIComponentTestCase { private JDesktopPane jD...
683
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.ComponentUtils; import org.uispec4j.utils.Stringifier; import java.awt.*; public class SwingComponentStringifier implements Stringifier { private static final SwingComponentStringifier INSTANCE = new SwingComponentStringifier(); private SwingComponentStringifier()...
124
github-java-corpus
2,012
package org.uispec4j.extension; import org.uispec4j.utils.Utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; class StreamRecorder extends Thread { private InputStream inputStream; private StringBuffer buffer = new StringBuffer(); pu...
245
github-java-corpus
2,012
package org.uispec4j.extension; import org.uispec4j.Panel; import org.uispec4j.finder.ComponentMatcher; import org.uispec4j.finder.ComponentMatchers; import javax.swing.*; import java.awt.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; pub...
593
github-java-corpus
2,012
package org.uispec4j.extension; import org.uispec4j.AbstractUIComponent; import java.awt.*; public class CustomCountingButton extends AbstractUIComponent { public static final String TYPE_NAME = "countingButton"; public static final Class[] SWING_CLASSES = {JCountingButton.class}; JCountingButton jButton; ...
140
github-java-corpus
2,012
package org.uispec4j.extension; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class JCountingButton extends JButton { private int count; public JCountingButton(String text) { super(text); addActionListener(new ActionListener() { public void ac...
104
github-java-corpus
2,012
package org.uispec4j.extension; import org.objectweb.asm.util.ASMifierClassVisitor; import org.uispec4j.Panel; /** * Shortcut for dumping the ASM definition of a given class */ public class Asmifier { public static void main(String[] args) throws Exception { ASMifierClassVisitor.main(new String[]{Panel.class...
78
github-java-corpus
2,012
package org.uispec4j.extension; import org.uispec4j.Button; public class DerivedCountingButton extends Button { public static final String TYPE_NAME = "countingButton"; public static final Class[] SWING_CLASSES = {JCountingButton.class}; JCountingButton jButton; public DerivedCountingButton(JCountingButton ...
136
github-java-corpus
2,012
package org.uispec4j.extension; import org.uispec4j.TestUtils; import org.uispec4j.utils.UnitTestCase; import java.io.File; import java.io.IOException; public class ExtensionGeneratorTest extends UnitTestCase { private File output; protected void setUp() throws Exception { super.setUp(); output = new Fi...
777
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.UIComponentFactory; import org.uispec4j.utils.UnitTestCase; import javax.swing.*; import java.awt.*; public abstract class UIComponentTestCase extends UnitTestCase { public abstract void testGetComponentTypeName() throws Exception; public abstract void testGetDes...
421
github-java-corpus
2,012
package org.uispec4j; import javax.swing.*; public class WindowForDialogTest extends WindowTestCase { public void testIsModalWithNonModalDialog() throws Exception { Window window = new Window(new JDialog()); checkIsModal(window, false); } public void testIsModalWithModalDialog() throws Exception { ...
213
github-java-corpus
2,012
package org.uispec4j.assertion; import junit.framework.AssertionFailedError; public class DummyAssertion extends Assertion { public static final Assertion TRUE = new DummyAssertion(true); public static final Assertion FALSE = new DummyAssertion(false); public static final String DEFAULT_ERROR_MSG = "custom erro...
158
github-java-corpus
2,012
package org.uispec4j.assertion; import org.uispec4j.utils.UnitTestCase; public class AssertionTest extends UnitTestCase { public void testIsTrue() throws Exception { assertTrue(DummyAssertion.TRUE.isTrue()); assertFalse(DummyAssertion.FALSE.isTrue()); } }
58
github-java-corpus
2,012
package org.uispec4j.assertion; import junit.framework.AssertionFailedError; import org.uispec4j.UISpec4J; import org.uispec4j.utils.Chrono; import org.uispec4j.utils.Functor; import org.uispec4j.utils.UnitTestCase; import org.uispec4j.utils.Utils; public class UISpecAssertTest extends UnitTestCase { protected voi...
1,694
github-java-corpus
2,012
package org.uispec4j; import static org.uispec4j.DummySpinner.listModel; import javax.swing.*; public class NumberSpinnerTest extends SpinnerTestCase { private NumberSpinner numberSpinner; protected void setUp() throws Exception { super.setUp(); numberSpinner = (NumberSpinner)spinner; } public Stri...
280
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.UIComponentFactory; import org.uispec4j.xml.XmlAssert; import javax.swing.*; public class RadioButtonTest extends ButtonTestCase { private RadioButton radioButton; private JRadioButton jRadioButton; protected void setUp() throws Exception { super.setUp(); ...
291
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.UIComponentFactory; import org.uispec4j.xml.XmlAssert; import javax.swing.*; public class TableComponentTest extends UIComponentTestCase { private Table table; private JTable jTable; protected void setUp() throws Exception { super.setUp(); init(new JTabl...
252
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.xml.XmlAssert; import javax.swing.AbstractButton; import javax.swing.*; public class ToggleButtonTest extends ButtonTestCase { private JToggleButton jToggleButton = new JToggleButton(); private ToggleButton toggle; protected void setUp() throws Exception { super....
315
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.UIComponentFactory; import org.uispec4j.xml.XmlAssert; import javax.swing.*; public class ButtonTest extends ButtonTestCase { private JButton jButton = new JButton(); private Button button; protected void setUp() throws Exception { super.setUp(); button...
205
github-java-corpus
2,012
package org.uispec4j; import junit.framework.AssertionFailedError; import org.uispec4j.utils.ArrayUtils; import org.uispec4j.utils.AssertionFailureNotDetectedError; import org.uispec4j.xml.EventLogger; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree...
2,284
github-java-corpus
2,012
package org.uispec4j; import junit.framework.AssertionFailedError; import org.uispec4j.assertion.UISpecAssert; import org.uispec4j.interception.WindowInterceptor; import org.uispec4j.utils.AssertionFailureNotDetectedError; import org.uispec4j.utils.UIComponentFactory; import org.uispec4j.xml.XmlAssert; import javax.s...
973
github-java-corpus
2,012
package org.uispec4j; import junit.framework.AssertionFailedError; import org.uispec4j.assertion.Assertion; import org.uispec4j.utils.AssertionFailureNotDetectedError; import javax.swing.*; public class TableEditionTest extends TableTestCase { public void testEditCellForString() throws Exception { table.editCe...
1,423
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.utils.ColorUtils; import org.uispec4j.utils.UnitTestCase; import org.uispec4j.xml.XmlAssert; import javax.swing.*; import java.awt.*; public class AbstractUIComponentTest extends UnitTestCase { public void testGetComponentTypeName() throws Exception { XmlAssert.assert...
621
github-java-corpus
2,012
package org.uispec4j; import javax.swing.*; public class PasswordFieldTest extends UIComponentTestCase { private PasswordField passwordField; private JPasswordField jPasswordField; protected void setUp() throws Exception { jPasswordField = new JPasswordField(); passwordField = new PasswordField(jPassw...
215
github-java-corpus
2,012
package org.uispec4j; import org.uispec4j.assertion.Assertion; import org.uispec4j.utils.Functor; import org.uispec4j.xml.XmlAssert; import javax.swing.*; import java.util.Hashtable; public class SliderTest extends UIComponentTestCase { private JSlider jSlider = createTemperatureSlider(); private Slider slider =...
1,015
github-java-corpus
2,012
package org.uispec4j; import junit.framework.AssertionFailedError; import org.uispec4j.utils.AssertionFailureNotDetectedError; import javax.swing.*; import java.awt.*; public class WindowForFrameTest extends WindowTestCase { public void testIsModal() throws Exception { Window window = new Window(new Frame());...
258