From c6cebde3656dbadc910ba9cc0595c8c3d5f1ee5e Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 27 Feb 2017 13:38:34 -0800 Subject: [PATCH] Fixing tests --- .../sourceforge/pmd/lang/vf/ast/VfDocStyleTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pmd-visualforce/src/test/java/net/sourceforge/pmd/lang/vf/ast/VfDocStyleTest.java b/pmd-visualforce/src/test/java/net/sourceforge/pmd/lang/vf/ast/VfDocStyleTest.java index db0c637564..408adc0712 100644 --- a/pmd-visualforce/src/test/java/net/sourceforge/pmd/lang/vf/ast/VfDocStyleTest.java +++ b/pmd-visualforce/src/test/java/net/sourceforge/pmd/lang/vf/ast/VfDocStyleTest.java @@ -599,14 +599,10 @@ public class VfDocStyleTest extends AbstractVfNodesTest { @Test public void noQuoteAttrWithJspEL() { Set attributes = getNodes(ASTAttributeValue.class, TEST_NO_QUOTE_ATTR_WITH_EL); - assertEquals("two attributes expected!", 2, attributes.size()); + assertEquals("One attribute expected!", 1, attributes.size()); Iterator iterator = attributes.iterator(); - ASTAttributeValue attr2 = iterator.next(); - if ("url".equals(attr2.getImage())) { - attr2 = iterator.next(); - } - - ASTIdentifier id = attr2.getFirstDescendantOfType(ASTIdentifier.class); + ASTAttributeValue attr = iterator.next(); + ASTIdentifier id = attr.getFirstDescendantOfType(ASTIdentifier.class); assertEquals("Expected to detect proper value for EL in attribute!", "something", id.getImage()); } @@ -693,5 +689,5 @@ public class VfDocStyleTest extends AbstractVfNodesTest { private static final String TEST_UNCLOSED_ATTR = " "; - private static final String TEST_NO_QUOTE_ATTR_WITH_EL = " foo "; + private static final String TEST_NO_QUOTE_ATTR_WITH_EL = " foo "; }