コード例 #1
0
 @Test
 public void equalsDesriptionWithEqualText() throws Exception {
   description.setText("equalMe"); // $NON-NLS-1$
   SimpleTextualDescription otherDescription = new SimpleTextualDescription();
   otherDescription.setText("equalMe"); // $NON-NLS-1$
   assertEquals(description, otherDescription);
 }
コード例 #2
0
 @Test
 public void hasSameHashCodeLikeOtherEmptyDescription() throws Exception {
   assertEquals(description.hashCode(), new SimpleTextualDescription().hashCode());
 }
コード例 #3
0
 @Test
 public void doesNotEqualObject() throws Exception {
   assertFalse(description.equals(new Object()));
 }
コード例 #4
0
 @Test
 public void textChangeListenerCountIncreasesWithAddition() throws Exception {
   description.addTextChangedListener(createMockTextChangeListener());
   assertEquals(1, description.getTextChangeListenerCount());
 }
コード例 #5
0
 @Test
 public void noTextChangeListenersAreRegistered() throws Exception {
   assertEquals(0, description.getTextChangeListenerCount());
 }