Esempio n. 1
0
  @Test
  public void testRemoveStringProperty() throws Exception {
    sm.register(SOURCE, testFile);
    Source source = sm.getSource(SOURCE);
    String stringProp = "testFileProp";
    associateString(source, stringProp);
    source.deleteProperty(stringProp);

    assertEquals(source.getStringPropertyNames().length, 0);
    assertEquals(source.getFilePropertyNames().length, 0);
  }
Esempio n. 2
0
  @Test
  public void testRemoveAll() throws Exception {
    sm.register(SOURCE, testFile);

    Source src = sm.getSource(SOURCE);
    associateFile(src, "statisticsFile");
    associateString(src, "statistics");

    sm.removeAll();
    sm.register(SOURCE, testFile);
    src = sm.getSource(SOURCE);
    assertEquals(src.getStringPropertyNames().length, 0);
    assertEquals(src.getFilePropertyNames().length, 0);
  }