Skip to content

Commit

Permalink
Add template unit test for unimplemented validation in `parameter_sto…
Browse files Browse the repository at this point in the history
…re` component
  • Loading branch information
Jbsco committed Aug 14, 2024
1 parent c951b06 commit 635f27a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tests:
description: This unit test tests the behavior when updating the parameter table with a memory region of invalid length.
- name: Test_Table_Upload_Crc_Error
description: This unit test tests the behavior when updating the parameter table with a memory region that contains an invalid CRC.
- name: Test_Table_Validate_Error
description: This unit test tests the behavior when validation of the parameter table by memory region upload fails.
- name: Test_Table_Fetch_Length_Error
description: This unit test tests the behavior when fetching the parameter table with a memory region of invalid length.
- name: Test_No_Dump_On_Change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-- Parameter_Store Tests Body
--------------------------------------------------------------------------------

with AUnit.Assertions; use AUnit.Assertions;
with Basic_Assertions; use Basic_Assertions;
with Command_Response.Assertion; use Command_Response.Assertion;
with Command_Enums; use Command_Enums.Command_Response_Status;
Expand Down Expand Up @@ -298,6 +299,16 @@ package body Parameter_Store_Tests.Implementation is

end Test_Table_Upload_Crc_Error;

-- This unit test tests the behavior when validation of the parameter table by
-- memory region upload fails.
overriding procedure Test_Table_Validate_Error (Self : in out Instance) is
-- TODO declarations
Ignore : Instance renames Self;
begin
-- TODO replace the following with actual test code.
Assert (False, "Test 'Test_Table_Validate_Error' is unimplemented.");
end Test_Table_Validate_Error;

overriding procedure Test_Table_Fetch_Length_Error (Self : in out Instance) is
use Parameter_Enums.Parameter_Table_Update_Status;
use Parameter_Enums.Parameter_Table_Operation_Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ private
overriding procedure Test_Table_Upload_Length_Error (Self : in out Instance);
-- This unit test tests the behavior when updating the parameter table with a memory region that contains an invalid CRC.
overriding procedure Test_Table_Upload_Crc_Error (Self : in out Instance);
-- This unit test tests the behavior when validation of the parameter table by memory region upload fails.
overriding procedure Test_Table_Validate_Error (Self : in out Instance);
-- This unit test tests the behavior when fetching the parameter table with a memory region of invalid length.
overriding procedure Test_Table_Fetch_Length_Error (Self : in out Instance);
-- This unit test tests the no-dump-on-change configuration for the Init function and makes sure the component behaves as expected.
Expand Down

0 comments on commit 635f27a

Please sign in to comment.