javaDungAF.tests
Class TestDefenceSets

Object
  extended by TestDefenceSets

public class TestDefenceSets
extends Object

A class to test getDefenceSetsAround(String). It checks that, given the argument arg, the method returns a set of argument-sets which includes -

  1. no strict superset of a defence-set around arg;
  2. no non-admissible set; and
  3. every defence-set around arg.
The class runs this test for all arguments in 100 AFs, each comprising 20 arguments and 20 attacks, and each generated by getRandomDungAF(int, int, int, int, Collection<String>).

The class assumes the correctness of admissibleSetsContain(Collection<String>... ) and of getAdmissibleSets(). The former method is very simple, while the latter can be checked with TestWithAspartix.


Field Summary
(package private) static DungAF af
           
(package private) static HashSet<String> argPool
           
(package private) static int ITERATIONS
           
(package private) static int MAX_ARGS
           
(package private) static int MAX_ATTS
           
(package private) static int MIN_ARGS
           
(package private) static int MIN_ATTS
           
 
Constructor Summary
TestDefenceSets()
           
 
Method Summary
private static void checkDefenceSets()
           
static void main(String[] args)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

argPool

static HashSet<String> argPool

af

static DungAF af

ITERATIONS

static final int ITERATIONS
See Also:
Constant Field Values

MIN_ARGS

static final int MIN_ARGS
See Also:
Constant Field Values

MAX_ARGS

static final int MAX_ARGS
See Also:
Constant Field Values

MIN_ATTS

static final int MIN_ATTS
See Also:
Constant Field Values

MAX_ATTS

static final int MAX_ATTS
See Also:
Constant Field Values
Constructor Detail

TestDefenceSets

public TestDefenceSets()
Method Detail

main

public static void main(String[] args)

checkDefenceSets

private static void checkDefenceSets()