88import org .approvaltests .combinations .pairwise .OptionsForAParameter ;
99import org .approvaltests .combinations .pairwise .Pairwise ;
1010import org .approvaltests .core .Options ;
11- import org .lambda .utils .Range ;
12- import org .approvaltests .reporters .UseReporter ;
13- import org .approvaltests .reporters .macosx .DiffMergeReporter ;
1411import org .approvaltests .scrubbers .RegExScrubber ;
1512import org .junit .jupiter .api .Test ;
1613import org .lambda .actions .Action2 ;
14+ import org .lambda .utils .Range ;
1715
1816import java .text .DecimalFormat ;
1917import java .util .ArrayList ;
@@ -36,7 +34,6 @@ void forTable()
3634 "Pairwise Combinations" };
3735 MarkdownTable table = MarkdownTable .withHeaders (headers );
3836 table .setColumnProperties (MarkdownColumn .RIGHT_JUSTIFIED );
39- // + "| --------------------: | -----------------------: | ------------------: | ---------------------: |\n");
4037 addPairwiseTableRow (2 , 5 , table );
4138 addPairwiseTableRow (3 , 3 , table );
4239 addPairwiseTableRow (3 , 4 , table );
@@ -47,7 +44,7 @@ void forTable()
4744 Approvals .verify (String .format ("\n \n %s\n \n " , table .toMarkdown ()),
4845 new Options ().forFile ().withExtension ("include.md" ));
4946 }
50- private String addPairwiseTableRow (int pCount , int variations , MarkdownTable table )
47+ private void addPairwiseTableRow (int pCount , int variations , MarkdownTable table )
5148 {
5249 Object [] p = Range .get (1 , variations );
5350 Pairwise pairwise = Pairwise .toPairWise (p , p , 3 <= pCount ? p : CombinationApprovals .EMPTY ,
@@ -58,20 +55,6 @@ private String addPairwiseTableRow(int pCount, int variations, MarkdownTable tab
5855 int totalPossibleSize = pairwise .getTotalPossibleCombinations ();
5956 DecimalFormat df = new DecimalFormat ("###,###,###" );
6057 table .addRow (pCount , p .length , df .format (totalPossibleSize ), cases .size ());
61- return null ;
62- }
63- private String getPairwiseTableRow (int pCount , int variations )
64- {
65- Object [] p = Range .get (1 , variations );
66- Pairwise pairwise = Pairwise .toPairWise (p , p , 3 <= pCount ? p : CombinationApprovals .EMPTY ,
67- 4 <= pCount ? p : CombinationApprovals .EMPTY , 5 <= pCount ? p : CombinationApprovals .EMPTY ,
68- 6 <= pCount ? p : CombinationApprovals .EMPTY , 7 <= pCount ? p : CombinationApprovals .EMPTY ,
69- 8 <= pCount ? p : CombinationApprovals .EMPTY , 9 <= pCount ? p : CombinationApprovals .EMPTY );
70- final List <Case > cases = pairwise .getCases ();
71- int totalPossibleSize = pairwise .getTotalPossibleCombinations ();
72- DecimalFormat df = new DecimalFormat ("###,###,###" );
73- String result = String .format ("|%s|%s|%s|%s|\n " , pCount , p .length , df .format (totalPossibleSize ), cases .size ());
74- return result ;
7558 }
7659 @ Test
7760 public void testPairs ()
0 commit comments