Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
985 B
1
Indexable
Never
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.4.22 <0.9.0;

import "remix_tests.sol";
import "remix_accounts.sol";
import "../CSC8113proj.sol";

contract testSuite {
    DataUsage dataUsage;
    Agreement agreement;
    Log log;
    Verification verification;

    // Define a global variable
    address constant actorId = 0x1234567890123456789012345678901234567890;

    function beforeAll() public {
        dataUsage = new DataUsage();
        agreement = new Agreement();
        log = new Log();
        verification = new Verification(address(dataUsage), address(agreement), address(log));
    }

    function testCase1() public {
        string[] memory personalData = new string[](2);
        personalData[0] = "Account Number";
        personalData[1] = "Transaction History";

        // Use the global variable actorId in the function call
        dataUsage.addService("Banking Transactions", "Banking Services", "Write", personalData, {from: actorId});
    }
}