/** * Asserts that the statistic obtained by probing the three-element union * with statistics <code>av</code>, <code>bv</code>, and <code>cv</code> is * <code>expected</code>. */ private void testUnion(int expected, int av, int bv, int cv) { AnInteger a = new AnInteger(av), b = new AnInteger(bv), c = new AnInteger( cv); Graph g1 = graphWithGivenStatistic(a); Graph g2 = graphWithGivenStatistic(b); Graph g3 = graphWithGivenStatistic(c); Graph[] graphs = new Graph[] { g1, g2, g3 }; MultiUnion mu = new MultiUnion(graphs); GraphStatisticsHandler gs = new MultiUnion.MultiUnionStatisticsHandler( mu); assertEquals(expected, gs.getStatistic(Node.ANY, Node.ANY, Node.ANY)); }
/** * Asserts that the statistic obtained by probing the three-element union * with statistics <code>av</code>, <code>bv</code>, and <code>cv</code> is * <code>expected</code>. */ private void testUnion(int expected, int av, int bv, int cv) { AnInteger a = new AnInteger(av), b = new AnInteger(bv), c = new AnInteger( cv); Graph g1 = graphWithGivenStatistic(a); Graph g2 = graphWithGivenStatistic(b); Graph g3 = graphWithGivenStatistic(c); Graph[] graphs = new Graph[] { g1, g2, g3 }; MultiUnion mu = new MultiUnion(graphs); GraphStatisticsHandler gs = new MultiUnion.MultiUnionStatisticsHandler( mu); assertEquals(expected, gs.getStatistic(Node.ANY, Node.ANY, Node.ANY)); }
@ContractTest public void testUnionValues() { testUnion(0, 0, 0, 0); }
@ContractTest public void testUnionValues() { testUnion(0, 0, 0, 0); }