Search in sources :

Example 1 with PropertyOnlyStatementMerger

use of org.openrefine.wikidata.schema.strategies.PropertyOnlyStatementMerger in project OpenRefine by OpenRefine.

the class WbStatementExprTest method testDeleteAllStatements.

@Test
public void testDeleteAllStatements() {
    setRow(recon("Q3434"), "2010-07-23", "3.898,4.389");
    evaluatesTo(new StatementEdit(Datamodel.makeStatement(Datamodel.makeClaim(subject, Datamodel.makeNoValueSnak(property), Collections.emptyList()), Collections.emptyList(), StatementRank.NORMAL, ""), new PropertyOnlyStatementMerger(), StatementEditingMode.DELETE), new Wrapper(statementDeleteExpr));
}
Also used : PropertyOnlyStatementMerger(org.openrefine.wikidata.schema.strategies.PropertyOnlyStatementMerger) StatementEdit(org.openrefine.wikidata.updates.StatementEdit) JacksonSerializationTest(org.openrefine.wikidata.testing.JacksonSerializationTest) Test(org.testng.annotations.Test)

Example 2 with PropertyOnlyStatementMerger

use of org.openrefine.wikidata.schema.strategies.PropertyOnlyStatementMerger in project OpenRefine by OpenRefine.

the class WbStatementExprTest method testAllowedNoMainValue.

@Test
public void testAllowedNoMainValue() {
    WbStatementExpr expr = new WbStatementExpr(null, Collections.emptyList(), Collections.emptyList(), new PropertyOnlyStatementMerger(), StatementEditingMode.DELETE);
    assertNull(expr.getMainsnak());
}
Also used : PropertyOnlyStatementMerger(org.openrefine.wikidata.schema.strategies.PropertyOnlyStatementMerger) JacksonSerializationTest(org.openrefine.wikidata.testing.JacksonSerializationTest) Test(org.testng.annotations.Test)

Aggregations

PropertyOnlyStatementMerger (org.openrefine.wikidata.schema.strategies.PropertyOnlyStatementMerger)2 JacksonSerializationTest (org.openrefine.wikidata.testing.JacksonSerializationTest)2 Test (org.testng.annotations.Test)2 StatementEdit (org.openrefine.wikidata.updates.StatementEdit)1