예제 #1
0
  @Before
  public void setUp() throws Exception {
    ontology = FakeRDFModel.getFakeSchema();
    model = FakeRDFModel.getFakeAnnotations();

    changes = new ChangeHelper(model, ontology);
  }
예제 #2
0
  @Test
  public void testCreate() throws Exception {
    Model foo = FakeRDFModel.createInstance("Person", "name", "*****@*****.**");

    model.add(foo);

    assert foo.difference(changes.get(0).getChange()).isEmpty();

    assert changes.size() == 1;
    assert model.containsAll(foo);

    changes.undo();

    assert changes.size() == 1;
    assert !model.containsAny(foo);

    changes.redo();

    assert changes.size() == 1;
    assert model.containsAll(foo);
  }