Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Commit

Permalink
#89 Delete Insert (-пробел)
Browse files Browse the repository at this point in the history
  • Loading branch information
bittenradish committed Oct 26, 2019
1 parent f24357c commit 4dbb033
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,19 @@ public Checker sparqlUpdate() {
TupleQuery tupleQuery =repcon.prepareTupleQuery(QueryLanguage.SPARQL,queryString);

String strShouldBe = "(urn:x-local:graph1, http://purl.org/dc/elements/1.1/publisher, \"Bob23\") [null]";

Reader reader = new StringReader(strShouldBe);
Model modelInserted = null;
try {
modelInserted = Rio.parse(reader, "", RDFFormat.RDFXML);
} catch (IOException e) {
e.printStackTrace();
}
checker = getHTTPRep();
RepositoryResult<Statement> afterUpdate = checker.resultStatement;
while (afterUpdate.hasNext()){
if((afterUpdate + "") == strShouldBe){
checker.testCheck = true;
}
}
Model modelAfterUpdate = QueryResults.asModel(afterUpdate);

System.out.println("" + modelAfterUpdate);
checker.testCheck = isSubset(modelInserted, modelAfterUpdate);
return checker;
}

Expand All @@ -159,14 +164,12 @@ public void HTTPRepositoryShouldWorkOk(){

checker= sparqlSelect();
assertThat("deleteHTTPRepo is Match: ", checker.testCheck, equalTo(true));

//
// checker = sparqlUpdate();
// assertThat("deleteHTTPRepo is Match: ", checker.testCheck, equalTo(true));

checker = deleteHTTPRep(emptyResult);
assertThat("deleteHTTPRepo is Match: ", checker.testCheck, equalTo(true));
// assertThat("deleteHTTPRepo length is zero: ", checker.size, equalTo(0));

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public class RepositoryControllerTest extends Rdf4jJaxrsTestSupport {

@Inject
protected RepositoryManagerComponent manager;

@Before
public void init() throws Exception {
ENDPOINT_ADDRESS = "http://localhost:" + getHttpPort() + "/rdf4j-server/repositories/";
Expand Down

0 comments on commit 4dbb033

Please sign in to comment.