You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Henry Story <he...@bblfish.net> on 2011/06/22 17:38:01 UTC

EzGraph was: apply-method for language

On 22 Jun 2011, at 17:23, Reto Bachmann-Gmuer wrote:

> To make debugging easier it woul be good to have tests of smaller sizes pass. So I recommend that before writing a test for an 18 triple-graph write a couple of test with only between  1 and 3 triples.

yes, that's just what I was doing now, and am having trouble there.

But at least we can see that the notation looks good.

Henry


Social Web Architect
http://bblfish.net/


Re: EzGraph was: apply-method for language

Posted by Reto Bachmann-Gmuer <re...@apache.org>.
On Wed, Jun 22, 2011 at 5:38 PM, Henry Story <he...@bblfish.net>wrote:

>
> On 22 Jun 2011, at 17:23, Reto Bachmann-Gmuer wrote:
>
> To make debugging easier it woul be good to have tests of smaller sizes
> pass. So I recommend that before writing a test for an 18 triple-graph write
> a couple of test with only between  1 and 3 triples.
>
>
> yes, that's just what I was doing now, and am having trouble there.
>
> But at least we can see that the notation looks good.
>

I though I try with what I thought to be the easiest possible case:

    private val miniGraph: Graph = {
        val henry = new UriRef("http://bblfish.net/#hjs")
        val reto = new UriRef("https://farewellutopia.com/user/me#me")
        val gr = new SimpleMGraph
        gr.add(new TripleImpl(reto,FOAF.knows, henry))
        gr.getGraph
    }

    @Test
    def miniUsingAsciiArrows {
        import org.apache.clerezza.rdf.scala.utils.EasyGraph._
        val ez = new EasyGraph()
        // example using arrows
        (
            "https://farewellutopia.com/user/me#me".uri -- FOAF.knows --> "
http://bblfish.net/#hjs".uri
        )
        Assert.assertEquals("Both graphs should have the same
size",largerGraph.size, ez.size)
        Assert.assertEquals("Both graphs should contain exactly the same
triples",miniGraph, ez.getGraph)
    }

But this doesn't even compile, how is one supposed to write this
single-triple graph with ez-graph?

Cheers,
Reto



>
> Henry
>
>
> Social Web Architect
> http://bblfish.net/
>
>