public void testRightUnion() { Graph g = graphWith( "" ); testSingleComponent( g, new DisjointUnion( Graph.emptyGraph, g ) ); }
public void testEmptyUnion() { DisjointUnion du = new DisjointUnion( Graph.emptyGraph, Graph.emptyGraph ); assertEquals( true, du.isEmpty() ); }
public void testRightUnion() { Graph g = graphWith( "" ); testSingleComponent( g, new DisjointUnion( Graph.emptyGraph, g ) ); }
public void testEmptyUnion() { DisjointUnion du = new DisjointUnion( Graph.emptyGraph, Graph.emptyGraph ); assertEquals( true, du.isEmpty() ); }
public void testLeftUnion() { Graph g = graphWith( "" ); testSingleComponent( g, new DisjointUnion( g, Graph.emptyGraph ) ); }
public void testLeftUnion() { Graph g = graphWith( "" ); testSingleComponent( g, new DisjointUnion( g, Graph.emptyGraph ) ); }
@Override public Graph getGraph() { Graph gBase = graphWith( "" ), g1 = graphWith( "" ); return new DisjointUnion( gBase, g1 ); }
@Override public Graph getGraph() { Graph gBase = graphWith( "" ), g1 = graphWith( "" ); return new DisjointUnion( gBase, g1 ); }
public void testRemoveBoth() { Graph L = graphWith( "x R y; a P b" ), R = graphWith( "x R y; p Q r" ); Graph du = new DisjointUnion( L, R ); du.delete( triple( "x R y" ) ); assertIsomorphic( graphWith( "a P b" ), L ); assertIsomorphic( graphWith( "p Q r" ), R ); }
public void testRemoveBoth() { Graph L = graphWith( "x R y; a P b" ), R = graphWith( "x R y; p Q r" ); Graph du = new DisjointUnion( L, R ); du.delete( triple( "x R y" ) ); assertIsomorphic( graphWith( "a P b" ), L ); assertIsomorphic( graphWith( "p Q r" ), R ); }
public void testAddLeftOnlyIfNecessary() { Graph L = graphWith( "" ), R = graphWith( "x R y" ); Graph du = new DisjointUnion( L, R ); graphAdd( du, "x R y" ); assertEquals( true, L.isEmpty() ); graphAdd( du, " a P b" ); assertIsomorphic( graphWith( "a P b" ), L ); assertIsomorphic( graphWith( "x R y" ), R ); } }
public void testAddLeftOnlyIfNecessary() { Graph L = graphWith( "" ), R = graphWith( "x R y" ); Graph du = new DisjointUnion( L, R ); graphAdd( du, "x R y" ); assertEquals( true, L.isEmpty() ); graphAdd( du, " a P b" ); assertIsomorphic( graphWith( "a P b" ), L ); assertIsomorphic( graphWith( "x R y" ), R ); } }
public void testBothComponents() { Graph L = graphWith( "" ), R = graphWith( "" ); Graph du = new DisjointUnion( L, R ); assertIsomorphic( Graph.emptyGraph, du ); L.add( triple( "x P y" ) ); assertIsomorphic( graphWith( "x P y" ), du ); R.add( triple( "A rdf:type Route" ) ); assertIsomorphic( graphWith( "x P y; A rdf:type Route" ), du ); }
public void testBothComponents() { Graph L = graphWith( "" ), R = graphWith( "" ); Graph du = new DisjointUnion( L, R ); assertIsomorphic( Graph.emptyGraph, du ); L.add( triple( "x P y" ) ); assertIsomorphic( graphWith( "x P y" ), du ); R.add( triple( "A rdf:type Route" ) ); assertIsomorphic( graphWith( "x P y; A rdf:type Route" ), du ); }