< prev index next >

test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java

Print this page




  52                     this.getClass().getResourceAsStream(INPUT_FILE1));
  53             while (re.hasNext()) {
  54                 int event = re.next();
  55                 if (event == XMLStreamConstants.START_ELEMENT) {
  56                     // System.out.println("#attrs = " + re.getAttributeCount());
  57                     Assert.assertTrue(re.getAttributeCount() == 2);
  58                     // This works if "" is replaced by null too
  59                     // System.out.println("attr1 = " + re.getAttributeValue("",
  60                     // "attr1"));
  61                     Assert.assertTrue(re.getAttributeValue("", "attr1").equals("pass"));
  62                 }
  63             }
  64             re.close();
  65         } catch (Exception e) {
  66             e.printStackTrace();
  67             Assert.fail("Exception occured: " + e.getMessage());
  68         }
  69     }
  70 
  71 }
  72 


  52                     this.getClass().getResourceAsStream(INPUT_FILE1));
  53             while (re.hasNext()) {
  54                 int event = re.next();
  55                 if (event == XMLStreamConstants.START_ELEMENT) {
  56                     // System.out.println("#attrs = " + re.getAttributeCount());
  57                     Assert.assertTrue(re.getAttributeCount() == 2);
  58                     // This works if "" is replaced by null too
  59                     // System.out.println("attr1 = " + re.getAttributeValue("",
  60                     // "attr1"));
  61                     Assert.assertTrue(re.getAttributeValue("", "attr1").equals("pass"));
  62                 }
  63             }
  64             re.close();
  65         } catch (Exception e) {
  66             e.printStackTrace();
  67             Assert.fail("Exception occured: " + e.getMessage());
  68         }
  69     }
  70 
  71 }

< prev index next >