use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class IssueBuilder_TestCase method shouldBuildIssueWithSpecifiedTargetEntity.
@Test
public void shouldBuildIssueWithSpecifiedTargetEntity() {
OWLEntity entity = mock(OWLEntity.class);
builder.addTargetEntity(entity, userId, TIMESTAMP);
Issue issue = builder.build(mentionParser);
assertThat(issue.getTargetEntities(), hasItem(entity));
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class IssueBuilder_TestCase method shouldBuildIssueWithAddedTargetEntityEvent.
@Test
public void shouldBuildIssueWithAddedTargetEntityEvent() {
OWLEntity entity = mock(OWLEntity.class);
builder.addTargetEntity(entity, userId, TIMESTAMP);
Issue issue = builder.build(mentionParser);
assertThat(issue.getEvents(), hasItem(new IssueTargetAdded(userId, TIMESTAMP, entity)));
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class IssueBuilder_TestCase method shouldBuildIssueWithRemovedTargetEntityEvent.
@Test
public void shouldBuildIssueWithRemovedTargetEntityEvent() {
OWLEntity entity = mock(OWLEntity.class);
builder.addTargetEntity(entity, userId, TIMESTAMP);
builder.removeTargetEntity(entity, userId, TIMESTAMP);
Issue issue = builder.build(mentionParser);
assertThat(issue.getEvents(), hasItem(new IssueTargetRemoved(userId, TIMESTAMP, entity)));
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class IssueBuilder_TestCase method shouldBuildIssueWithUpdatedTimestampOnAddTargetEntity.
@Test
public void shouldBuildIssueWithUpdatedTimestampOnAddTargetEntity() {
OWLEntity entity = mock(OWLEntity.class);
builder.addTargetEntity(entity, userId, TIMESTAMP);
Issue issue = builder.build(mentionParser);
assertThatIssueUpdatedTimestampWasUpdated(issue);
}
use of org.semanticweb.owlapi.model.OWLEntity in project webprotege by protegeproject.
the class IssueBuilder_TestCase method shouldBuildIssueWithUpdatedTimestampOnRemoveTargetEntity.
@Test
public void shouldBuildIssueWithUpdatedTimestampOnRemoveTargetEntity() {
OWLEntity entity = mock(OWLEntity.class);
builder.addTargetEntity(entity, userId, TIMESTAMP - 5);
builder.removeTargetEntity(entity, userId, TIMESTAMP);
Issue issue = builder.build(mentionParser);
assertThatIssueUpdatedTimestampWasUpdated(issue);
}
Aggregations