1 26 27 package net.sourceforge.groboutils.uicapture.v1.event; 28 29 import java.awt.Robot ; 30 31 import net.sourceforge.groboutils.autodoc.v1.AutoDoc; 32 import junit.framework.Test; 33 import junit.framework.TestCase; 34 import junit.framework.TestSuite; 35 36 37 46 public class AllowCapturePassThroughAdapterIUTest extends CaptureAdapterIUTest 47 { 48 51 private static final Class THIS_CLASS = AllowCapturePassThroughAdapterIUTest.class; 52 private static final AutoDoc DOC = new AutoDoc( THIS_CLASS ); 53 54 public AllowCapturePassThroughAdapterIUTest( String name ) 55 { 56 super( name ); 57 } 58 59 60 61 64 public void testInstantiation() 65 { 66 IAllowCapturePassThroughListener ica = 68 createAllowCapturePassThroughAdapter(); 69 } 70 71 72 73 74 public void testBasics2() 75 { 76 AllowCapturePassThroughAdapter acpta = 77 createAllowCapturePassThroughAdapter(); 78 assertTrue( 79 "allowMousePressed did not return true.", 80 acpta.allowMousePressed( null ) ); 81 assertTrue( 82 "allowMouseReleased did not return true.", 83 acpta.allowMouseReleased( null ) ); 84 assertTrue( 85 "allowKeyPressed did not return true.", 86 acpta.allowKeyPressed( null ) ); 87 assertTrue( 88 "allowKeyReleased did not return true.", 89 acpta.allowKeyReleased( null ) ); 90 } 91 92 93 96 protected CaptureAdapter createCaptureAdapter() 97 { 98 return new AllowCapturePassThroughAdapter(); 99 } 100 101 102 protected AllowCapturePassThroughAdapter 103 createAllowCapturePassThroughAdapter() 104 { 105 return new AllowCapturePassThroughAdapter(); 106 } 107 108 109 112 113 public static Test suite() 114 { 115 TestSuite suite = new TestSuite( THIS_CLASS ); 116 117 return suite; 118 } 119 120 public static void main( String [] args ) 121 { 122 String [] name = { THIS_CLASS.getName() }; 123 124 127 junit.textui.TestRunner.main( name ); 128 } 129 130 131 135 protected void setUp() throws Exception 136 { 137 super.setUp(); 138 139 } 141 142 143 147 protected void tearDown() throws Exception 148 { 149 151 152 super.tearDown(); 153 } 154 } 155 156 | Popular Tags |