コード例 #1
0
 public void testHashWithNullURL() {
   WebBrowserEditorInput input = new WebBrowserEditorInput(null, 0, ID1);
   input.hashCode(); // Fails if exception thrown
 }
コード例 #2
0
 public void testHashWithNullID() throws MalformedURLException {
   WebBrowserEditorInput input = new WebBrowserEditorInput(new URL(URL1), 0, null);
   input.hashCode(); // Fails if exception thrown
 }
コード例 #3
0
 public void testCompareWithDifferentStyle() throws MalformedURLException {
   WebBrowserEditorInput input = new WebBrowserEditorInput(new URL(URL1), 0, ID1);
   WebBrowserEditorInput input2 = new WebBrowserEditorInput(new URL(URL1), 1, ID1);
   assertTrue(input.equals(input2));
   assertTrue(input.hashCode() == input2.hashCode());
 }