Class FactorialTest

java.lang.Object
topics.foundation.factorial.FactorialTest

public class FactorialTest extends Object

Validation Suite for Factorial Algorithm

Verifies the mathematical exactness of the recursive factorial implementations, ensuring boundary conditions are respected and arithmetic outputs are strictly honored. Evaluates logic transparently utilizing native language assertions.

Author:
vicegd
  • Constructor Details

    • FactorialTest

      public FactorialTest()
  • Method Details

    • setup

      public void setup()
      Initializes the context and instantiates the computational engine prior to executing mathematical validations.
    • teardown

      public void teardown()
      Cleans up resources after the validations have completed execution.
    • shouldRejectNegativeInputs

      public void shouldRejectNegativeInputs()

      Scenario: Invoking the safe computation with a negative integer (-4).

      Expected Outcome: The algorithmic boundaries must reject the mathematical anomaly and safely return -1.

    • shouldComputePositiveFactorials

      public void shouldComputePositiveFactorials()

      Scenario: Invoking the safe computation with a valid positive integer (4).

      Expected Outcome: The mathematical cascade must accurately evaluate and strictly equate to 24.