TR-1: Implement Unit Testing: Test-HawkInvestigationParameter.Tests.ps1 #253
Labels
status/backlog
In backlog / validated
type/feature
New feature or request
type/gaant
Used for Gaant Visualization
Milestone
Test Plan: Test-HawkInvestigationParameter Function
The
Test-HawkInvestigationParameter
function is a critical internal helper function in the Hawk module that validates parameter combinations and constraints for investigation operations. It is used by bothStart-HawkTenantInvestigation
andStart-HawkUserInvestigation
to ensure valid parameter combinations and values before proceeding with investigations.Test Requirements Based on Provided Test Cases
FilePath Validation
FilePath
in non-interactive mode should fail validation.FilePath
should fail validation.FilePath
should pass validation.Date Parameter Validation
StartDate
/EndDate
combination should pass validation.StartDate
afterEndDate
should fail with appropriate error.EndDate
in future should fail validation.DaysToLookBack
(1-365) should pass validation.DaysToLookBack
(0) should fail validation.DaysToLookBack
(366) should fail validation.Parameter Combination Validation
StartDate
/EndDate
andDaysToLookBack
in non-interactive mode should fail.DaysToLookBack
withEndDate
(noStartDate
) should pass validation.DaysToLookBack
withStartDate
should fail validation with appropriate error.StartDate
withEndDate
(noDaysToLookBack
) should pass validation.Return Object Validation
IsValid
boolean property correctly reflects validation state.Testing Instructions
Test-HawkInvestigationParameter.Tests.ps1
in theHawk/tests/functions/
directory.BeforeAll
block to set up any required mocks.Describe
andContext
blocks to organize tests logically.functions
directory.IsValid
property accurately reflects the validation state.Objective
These tests will ensure the reliability of
Test-HawkInvestigationParameter
as a critical validation component in the Hawk module.The text was updated successfully, but these errors were encountered: