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>
This commit is contained in:
Andrew Woods 2020-04-07 12:30:56 -06:00 committed by GitHub
parent edef9309ab
commit 6d30a0fcd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 2 deletions

View file

@ -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"));
}
}