Examples of EMFDOMXPath


Examples of ca.ecliptical.emf.xpath.EMFDOMXPath

    writer2.getBooks().add(book3);
    fixture.getWriters().add(writer2);
  }

  public final void testSelectChildWithPredicate() throws Exception {
    EMFDOMXPath xpath = new EMFDOMXPath("books[@title='Book 1']");
    Book book = (Book) xpath.selectSingleNode(fixture);
    assertNotNull(book);
    assertEquals("Book 1", book.getTitle());
  }
View Full Code Here

Examples of ca.ecliptical.emf.xpath.EMFDOMXPath

    assertNotNull(book);
    assertEquals("Book 1", book.getTitle());
  }

  public final void testStringValueOf() throws Exception {
    EMFDOMXPath xpath = new EMFDOMXPath("writers[last()]/@name");
    String result = xpath.stringValueOf(fixture);
    assertEquals("Writer 2", result);
  }
View Full Code Here

Examples of ca.ecliptical.emf.xpath.EMFDOMXPath

    String result = xpath.stringValueOf(fixture);
    assertEquals("Writer 2", result);
  }

  public final void testSum() throws Exception {
    EMFDOMXPath xpath = new EMFDOMXPath("sum(books/@pages)");
    Number result = xpath.numberValueOf(fixture);
    assertNotNull(result);
    assertEquals(6000, result.intValue());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.