# Function Testing - Completed

<mark style="color:purple;">**PredictRAM Test Suite**</mark>

&#x20;

Test 1:&#x20;

Deploying the Portfolio Contract factory, leads to successful deployment of two contracts, portfolioBuyer and portfolioTokens.

&#x20;

Test 2:&#x20;

addMinter function in portfolioTokens contract, successfully adds the portfolioBuyer contract as a minter and thus allows the contract to mint portfolio Tokens.

&#x20;

Test 3:&#x20;

setTokenAddress function allows the portfolioBuyer contract to successfully mint the portfolio Tokens to the user.

&#x20;

Test 4:&#x20;

A designated Signer is added that successfully provides the signature from the backend and allows the buyer to buy portfolio tokens. Any tampering with the data passed reverts the transaction.

&#x20;

Test 5:&#x20;

BuyBack Function from the portfolioBuyer contract successfully, provides the value of the portfolio token , to the client according to the current market, by burning the portfolio token.

&#x20;

Test 6:&#x20;

All the setters are working as expected.

&#x20;

&#x20;

<mark style="color:purple;">**About tester:**</mark>

&#x20;

Solidity Developer and Tester with 1.5 years of experience in writing many P2E games. Tester with knowledge of both automated tests with hardhat and remix testing. Experienced in working with team of developers.

{% file src="https://1226910828-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F50j5YEVdcHSEBkJs6Z37%2Fuploads%2FD0aFi6WOwiFFHdfxoo5J%2FFunction%20Testing%20File%20-H%20(1).pdf?alt=media&token=8fb50edc-3864-450b-bdb1-a65d01ecd697" %}
File
{% endfile %}
