#!/usr/bin/env ruby $LOAD_PATH.unshift '../lib/' $LOAD_PATH.unshift '../../lib/' $LOAD_PATH.unshift './net/' # Testing load and query of remote rdf from the web (using Grubstreet) # see http://esw.w3.org/topic/RestaurantRecommendation for more context on scenario behind this. # # this test currently assumes too much about local environment # (ie. that it is on danbri's server and the database is already initialised) # # Dan Brickley # $Id: tc_grub.rb,v 1.4 2003/04/18 18:06:12 danbri Exp $ require 'test/unit' require 'basicrdf' require 'fgrub' require 'qgrub' class TC_GrubTest < Test::Unit::TestCase def setup # fetch data here instead? end def test_fgrub f=fetch_grub # puts f['raw'] # FIXME: check number of non-empty graphs, or something end def test_qgrub q=query_grub e=10 #hmm, i guess. need a test dataset we're confident of answers for! puts q['log'] assert(e==q['hits'].to_i, "actual results: #{q['hits']} didn't match expected: #{e}") end def teardown @data = nil end end