Uploaded image for project: 'Tupelo'
  1. Tupelo
  2. TUP-240

Unifier with no columns fails

XMLWordPrintableJSON

      @Test
      public void testAskStyleQuery() throws Exception {
      Context c = getContext();
      try {
      // try it as a transformer
      Triple theTriple = Triple.create(Rdf.TYPE,Rdf.TYPE,Rdf.TYPE);
      Transformer ask = new Transformer();
      ask.addInPattern(Rdf.TYPE,Rdf.TYPE,Rdf.TYPE);
      ask.addOutPattern(Rdf.TYPE,Rdf.TYPE,Rdf.TYPE);
      c.perform(ask);
      Set<Triple> ts = ask.getResult();
      assert ts.size()==0;
      // now add the triple
      c.addTriples(theTriple);
      ask = new Transformer();
      ask.addInPattern(Rdf.TYPE,Rdf.TYPE,Rdf.TYPE);
      ask.addOutPattern(Rdf.TYPE,Rdf.TYPE,Rdf.TYPE);
      c.perform(ask);
      ts = ask.getResult();
      assert ts.size()==1;
      for(Triple t : ask.getResult())

      { assert t.equals(theTriple); }

      // now remove the triple
      c.removeTriples(theTriple);
      } catch(OperatorUnavailableException x)

      { // skip }

      finally

      { closeContext(c); }

      }

              futrelle Joe Futrelle (Inactive)
              futrelle Joe Futrelle (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: