pragma solidity 0.8.26;
import {Test} from "lib/forge-std/src/Test.sol";
import {console} from "lib/forge-std/src/console.sol";
import {InheritanceManager} from "src/InheritanceManager.sol";
contract InheritanceManagerTest is Test {
    InheritanceManager public inheritanceManager;
    address public owner;
    address public beneficiary1;
    address public beneficiary2;
    address public beneficiary3;
    mapping(address => string) private name;
    function getName( address addr ) private view returns ( string memory ) {  
        return name[addr];
    }
    function test________() public {
        owner = makeAddr("owner");
        beneficiary1 = makeAddr("beneficiary1");
        beneficiary2 = makeAddr("beneficiary2");
        beneficiary3 = makeAddr("beneficiary3");
        
        name[owner] = "owner";
        
        name[beneficiary1] = "beneficiary1";
        
        name[beneficiary2] = "beneficiary2";
        
        name[beneficiary3] = "beneficiary3";
        name[address(0)] = "0";
        vm.prank(owner);
        inheritanceManager = new InheritanceManager();
        READ____InheritanceManager____beneficiaries();
        vm.startPrank(owner);
        inheritanceManager.addBeneficiery(beneficiary1);
        inheritanceManager.addBeneficiery(beneficiary2);
        inheritanceManager.addBeneficiery(beneficiary3);
        vm.stopPrank();
        READ____InheritanceManager____beneficiaries();
        vm.prank(owner);
        inheritanceManager.removeBeneficiary(beneficiary2);
        READ____InheritanceManager____beneficiaries();
    }
    function READ____InheritanceManager____beneficiaries() private view {
        address[] memory AAAAAA = inheritanceManager.getBeneficiaries();
        console.log( "" );
    
        console.log( string( abi.encodePacked( 
            
            "==========  "  ,  "  InheritanceManager  ::  beneficiaries  "  ,  "  ==========" 
        ) ) );
        console.log( "" );
        console.log( "" );
        console.log(  
            AAAAAA.length  
        
        );
        console.log( "" );
        console.log( " \n " );
        for ( uint256 III = 0 ; III < AAAAAA.length ; III++ ) {
            console.log( "" );
            console.log(  
    
                getName( AAAAAA[ III ] )  
            );
            console.log( "" );
        }
        console.log( " \n " );
        console.log( "" );
        console.log( "======================================================================================" );
        console.log( "" );
    }
}