public void test_007a(){
  final IVariable x=Var.var("x");
  final IVariable y=Var.var("y");
  final IVariable z=Var.var("z");
  final XSDNumericIV<BigdataLiteral> one=new XSDNumericIV<BigdataLiteral>(1);
  one.setValue(f.createLiteral(1));
  final XSDNumericIV<BigdataLiteral> two=new XSDNumericIV<BigdataLiteral>(2);
  two.setValue(f.createLiteral(2));
  final XSDNumericIV<BigdataLiteral> three=new XSDNumericIV<BigdataLiteral>(3);
  three.setValue(f.createLiteral(3));
  final XSDNumericIV<BigdataLiteral> four=new XSDNumericIV<BigdataLiteral>(4);
  four.setValue(f.createLiteral(4));
  final XSDNumericIV<BigdataLiteral> five=new XSDNumericIV<BigdataLiteral>(5);
  final List<IBindingSet> bsets=new LinkedList<IBindingSet>();
{
    final IBindingSet bset=new ListBindingSet();
    bset.set(x,asConst(three));
    bset.set(y,asConst(four));
    bset.set(z,asConst(five));
    bsets.add(bset);
  }
{
    final IBindingSet bset=new ListBindingSet();
    bset.set(x,asConst(one));
    bset.set(y,asConst(two));
    bsets.add(bset);
  }
  final ISolutionSetStats expected=new MySolutionStats(2,asSet(x,y,z),asSet(z),asSet(x,y),asSet(x,y),emptyMap);
  final ISolutionSetStats actual=newFixture(bsets.toArray(new IBindingSet[]{}));
  assertSameStats(expected,actual);
}

public void test_007a ( ) { final IVariable x = Var . var ( "x" ) ; final IVariable y = Var . var ( "y" ) ; final IVariable z = Var . var ( "z" ) ; final XSDNumericIV < BigdataLiteral > one = new XSDNumericIV < BigdataLiteral > ( 1 ) ; one . setValue ( f . createLiteral ( 1 ) ) ; final XSDNumericIV < BigdataLiteral > two = new XSDNumericIV < BigdataLiteral > ( 2 ) ; two . setValue ( f . createLiteral ( 2 ) ) ; final XSDNumericIV < BigdataLiteral > three = new XSDNumericIV < BigdataLiteral > ( 3 ) ; three . setValue ( f . createLiteral ( 3 ) ) ; final XSDNumericIV < BigdataLiteral > four = new XSDNumericIV < BigdataLiteral > ( 4 ) ; four . setValue ( f . createLiteral ( 4 ) ) ; final XSDNumericIV < BigdataLiteral > five = new XSDNumericIV < BigdataLiteral > ( 5 ) ; final List < IBindingSet > bsets = new LinkedList < IBindingSet > ( ) ; { final IBindingSet bset = new ListBindingSet ( ) ; bset . set ( x , asConst ( three ) ) ; bset . set ( y , asConst ( four ) ) ; bset . set ( z , asConst ( five ) ) ; bsets . add ( bset ) ; } { final IBindingSet bset = new ListBindingSet ( ) ; bset . set ( x , asConst ( one ) ) ; bset . set ( y , asConst ( two ) ) ; bsets . add ( bset ) ; } final ISolutionSetStats expected = new MySolutionStats ( 2 , asSet ( x , y , z ) , asSet ( z ) , asSet ( x , y ) , asSet ( x , y ) , emptyMap ) ; final ISolutionSetStats actual = newFixture ( bsets . toArray ( new IBindingSet [ ] { } ) ) ; assertSameStats ( expected , actual ) ; }
unit test with two solutions having two variables which are bound in every solution plus one variable which is bound in just one of the solutions ( this is the same as the previous test except that it presents the solutions in a different order to test the logic which detects variables which are not always bound and the variable which only appears in one solution is not materialized in that solution ) .
