-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Model writer lang from "N3-PP" to "N3" (#149)
Resolves: https://jira.lyrasis.org/browse/VIVO-1761 Co-authored-by: Andrew Woods <awoods@duraspace.org>
- Loading branch information
Andrew Woods
and
Andrew Woods
committed
Apr 7, 2020
1 parent
edef930
commit 6d30a0f
Showing
2 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...ava/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/AdditionsAndRetractionsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo; | ||
|
||
import org.apache.jena.rdf.model.Model; | ||
import org.apache.jena.rdf.model.ModelFactory; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import static org.apache.jena.rdf.model.ResourceFactory.createProperty; | ||
import static org.apache.jena.rdf.model.ResourceFactory.createResource; | ||
import static org.apache.jena.rdf.model.ResourceFactory.createStatement; | ||
import static org.apache.jena.rdf.model.ResourceFactory.createStringLiteral; | ||
|
||
/** | ||
* @author awoods | ||
* @since 2020-04-01 | ||
*/ | ||
public class AdditionsAndRetractionsTest { | ||
|
||
@Test | ||
public void testToString() { | ||
Model additions = ModelFactory.createDefaultModel(); | ||
additions.add(createStatement( | ||
createResource("test:add"), | ||
createProperty("test:prop"), | ||
createStringLiteral("new"))); | ||
|
||
Model retractions = ModelFactory.createDefaultModel(); | ||
retractions.add(createStatement( | ||
createResource("test:retract"), | ||
createProperty("test:prop"), | ||
createStringLiteral("old"))); | ||
AdditionsAndRetractions aar = new AdditionsAndRetractions(additions, retractions); | ||
|
||
final String s = aar.toString(); | ||
Assert.assertNotNull(s); | ||
Assert.assertTrue(s.contains("test:add")); | ||
Assert.assertTrue(s.contains("test:retract")); | ||
} | ||
} |