Class PermutationsTest

java.lang.Object
topics.backtracking.permutations.PermutationsTest

class PermutationsTest extends Object

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 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.