コード例 #1
0
 @Test(expected = IllegalArgumentException.class)
 public void cannotCheckAttributeByNullName() {
   element.hasAttr(null);
 }
コード例 #2
0
 @Test
 public void canCheckAttributeByNonExistingName() {
   boolean hasAttribute = element.hasAttr(NON_EXISTING);
   assertThat(hasAttribute).isFalse();
 }
コード例 #3
0
 @Test
 public void canRemoveAttributeByNonExistingName() {
   element.removeAttr(NON_EXISTING);
   assertThat(element.hasAttr(NON_EXISTING)).isFalse();
 }
コード例 #4
0
 @Test
 public void canCheckAttributeByName() {
   boolean hasAttribute = element.hasAttr("order");
   assertThat(hasAttribute).isTrue();
 }
コード例 #5
0
 @Test
 public void canRemoveAttributeByName() {
   element.removeAttr("order");
   assertThat(element.hasAttr("order")).isFalse();
 }