Class PermutationsTest
java.lang.Object
topics.backtracking.permutations.PermutationsTest
Test Suite for Permutations Generator
Validates the exhaustive backtracking permutation algorithm. Employs assertions to verify that the generated count matches theoretical factorial math expectations.
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidsetup()Initializes context and resources prior to executing the test suite.(package private) voidScenario: Generating permutations for a set of 5 elements.(package private) voidScenario: Generating permutations for a set of 4 elements.(package private) static voidteardown()Cleans up resources after the entire test suite has finished execution.
-
Constructor Details
-
PermutationsTest
PermutationsTest()
-
-
Method Details
-
setup
@BeforeAll static void setup()Initializes context and resources prior to executing the test suite. -
teardown
@AfterAll static void teardown()Cleans up resources after the entire test suite has finished execution. -
shouldGenerateExactlyTwentyFourPermutationsForFourElements
@Test void shouldGenerateExactlyTwentyFourPermutationsForFourElements()Scenario: Generating permutations for a set of 4 elements.
Expected Outcome: 4! equals exactly 24 configurations.
-
shouldGenerateExactlyOneHundredTwentyPermutationsForFiveElements
@Test void shouldGenerateExactlyOneHundredTwentyPermutationsForFiveElements()Scenario: Generating permutations for a set of 5 elements.
Expected Outcome: 5! equals exactly 120 configurations.
-