-
Notifications
You must be signed in to change notification settings - Fork 0
Testing the Console App
Let's take a look into how to test the SaleDeedRegistry contract using a console app. Below is the console app code snippet.

Please note - The Console App config needs to be updated for Contract Address and Sender Address. The Buyer, Owner and Payee Address also needs to be created.
Testing the console app is a really simple thing. That's because of the way how it's coded with "Actors". One just needs to set the application configuration and then hit a breakpoint to debug or directly run the same. You should be able to see the SaleDeedRegistry contract operations being called and the Receipt Response is being displayed on the console. If everything goes well, you should be able to see the application state set to - "Approved". This means the sale deed registry operations have been successfully executed and the ownership has to transfer from the seller to buyer.
Here is the application configuration. There are default app settings keys and there are important configurable elements like Sender, Buyer, Owner/Seller, Payee, and Contract Address that one needs to correctly as per the contract deployment and the wallet address creation for Buyer, Seller, and the Payee.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="WalletName" value="Hackathon_1"/>
<add key="WalletPassword" value="stratis"/>
<add key="SmartContractBaseUrl" value="http://localhost:37223"/>
<add key="GasPrice" value="100"/>
<add key="GasLimit" value="100000"/>
<add key="GasFee" value="0.01"/>
<add key="Amount" value="0"/>
<add key="ApplicationFee" value="2000"/>
<add key="SenderAddress" value="CUtNvY1Jxpn4V4RD1tgphsUKpQdo4q5i54"/>
<add key="BuyerAddress" value="CfW5AzGYA77DpWvdhPcfXvL1hUdkmjZ7PB" />
<add key="OwnerAddress" value="CdazH6VZkoKMg8FQogvLG4xNwFGDa9gwFQ"/>
<add key="PayeeAddress" value="CUtNvY1Jxpn4V4RD1tgphsUKpQdo4q5i54"/>
<add key="ContractAddress" value="CLsDoVPG2zbDWCYvQmdaj5DBcg7BiRu1mV" />
</appSettings>
</configuration>