/** * Regression test for HARMONY-2604 * */ public void testSizeActionPerformed() { String str = "test string"; JInternalFrame jf = new JInternalFrame(str); MetalInternalFrameTitlePane jp = new MetalInternalFrameTitlePane(jf); BasicInternalFrameTitlePane.SizeAction m = jp.new SizeAction(); try { m.actionPerformed(null); } catch (NullPointerException e) { fail("NPE shouldn't be thrown"); } }
/** * Regression test for HARMONY-2588 * */ public void testSizeActionKey() { String str = "test string"; JInternalFrame jf = new JInternalFrame(str); MetalInternalFrameTitlePane jp = new MetalInternalFrameTitlePane(jf); BasicInternalFrameTitlePane.SizeAction m = jp.new SizeAction(); assertEquals(1, m.getKeys().length); String key = (String)m.getKeys()[0]; assertEquals(Action.NAME, key); assertEquals("Size", m.getValue(key)); }