Ejemplo n.º 1
0
  /** Test of setTerm method, of class org.biojavax.SimpleNote. */
  public void testSetTerm() {
    System.out.println("testSetTerm");

    try {
      note.setTerm(null);
      fail("Should have got IllegalArgumentException");
    } catch (Exception ex) {
    }

    ComparableTerm term2 = ont.getOrCreateTerm("term2");
    try {
      note.setTerm(term2);
      assertEquals(term2, note.getTerm());
    } catch (Exception ex) {
      fail("Not expecting " + ex.getClass().getName());
    }
  }
Ejemplo n.º 2
0
 public SimpleNoteTest(String testName) {
   super(testName);
   ont = RichObjectFactory.getDefaultOntology();
   term = ont.getOrCreateTerm("test_term");
 }