@Test public void produceNWiseTest() { NWiseExtension nWiseExtension = new NWiseExtension(); Map<String, String[]> variableDomains = new HashMap<>(); variableDomains.put("A", new String[]{"1", "2", "3", "4"}); variableDomains.put("B", new String[]{"1", "2", "3", "4"}); variableDomains.put("C", new String[]{"1", "2", "3", "4"}); variableDomains.put("D", new String[]{"1", "2", "3", "4"}); variableDomains.put("E", new String[]{"1", "2", "3", "4"}); List<Map<String, String>> testCases = nWiseExtension.produceNWise(3, new String[]{"A", "B", "C", "D", "E"}, variableDomains); Assert.assertEquals(640, testCases.size()); }
public List<Map<String, String>> produceNWise(int nWise, String[] coVariables, Map<String, String[]> variableDomains) { List<Set<String>> tuples = makeNWiseTuples(coVariables, nWise); List<Map<String, String>> testCases = new ArrayList<>(); for (Set<String> tuple : tuples) { testCases.addAll(expandTupleIntoTestCases(tuple, variableDomains)); } return testCases; }
NWiseExtension implements CustomTagExtension<NWiseExtension.NWiseAction> { public List<Map<String, String>> produceNWise(int nWise, String[] coVariables, Map<String, String[]> variableDomains) { List<Set<String>> tuples = makeNWiseTuples(coVariables, nWise); List<Map<String, String>> testCases = new ArrayList<>(); for (Set<String> tuple : tuples) { testCases.addAll(expandTupleIntoTestCases(tuple, variableDomains)); } return testCases; } }
NWiseExtension implements CustomTagExtension<NWiseExtension.NWiseAction> { public List<Map<String, String>> produceNWise(int nWise, String[] coVariables, Map<String, String[]> variableDomains) { List<Set<String>> tuples = makeNWiseTuples(coVariables, nWise); List<Map<String, String>> testCases = new ArrayList<>(); for (Set<String> tuple : tuples) { testCases.addAll(expandTupleIntoTestCases(tuple, variableDomains)); } return testCases; }  }
NWiseExtension implements CustomTagExtension<NWiseExtension.NWiseAction> { public List<Map<String, String>> produceNWise(int nWise, String[] coVariables, Map<String, String[]> variableDomains) { List<Set<String>> tuples = makeNWiseTuples(coVariables, nWise); List<Map<String, String>> testCases = new ArrayList<>(); for (Set<String> tuple : tuples) { testCases.addAll(expandTupleIntoTestCases(tuple, variableDomains)); } return testCases; }  Class<NWiseAction> getTagActionClass(); String getTagName(); String getTagNameSpace(); List<Set<String>> makeNWiseTuples(String[] variables, int nWise); List<Map<String, String>> expandTupleIntoTestCases(Set<String> tuple, Map<String, String[]> variableDomains); List<Map<String, String>> produceNWise(int nWise, String[] coVariables, Map<String, String[]> variableDomains); List<Map<String, String>> pipelinePossibleStates(NWiseAction action, List<Map<String, String>> possibleStateList); }
NWiseExtension implements CustomTagExtension<NWiseExtension.NWiseAction> { public List<Map<String, String>> produceNWise(int nWise, String[] coVariables, Map<String, String[]> variableDomains) { List<Set<String>> tuples = makeNWiseTuples(coVariables, nWise); List<Map<String, String>> testCases = new ArrayList<>(); for (Set<String> tuple : tuples) { testCases.addAll(expandTupleIntoTestCases(tuple, variableDomains)); } return testCases; }  Class<NWiseAction> getTagActionClass(); String getTagName(); String getTagNameSpace(); List<Set<String>> makeNWiseTuples(String[] variables, int nWise); List<Map<String, String>> expandTupleIntoTestCases(Set<String> tuple, Map<String, String[]> variableDomains); List<Map<String, String>> produceNWise(int nWise, String[] coVariables, Map<String, String[]> variableDomains); List<Map<String, String>> pipelinePossibleStates(NWiseAction action, List<Map<String, String>> possibleStateList);  }