Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocking contract calls #52

Open
SkyKarma opened this issue Mar 1, 2023 · 1 comment
Open

Mocking contract calls #52

SkyKarma opened this issue Mar 1, 2023 · 1 comment

Comments

@SkyKarma
Copy link

SkyKarma commented Mar 1, 2023

A nice feature would be to allow mocking calls,

For example, my contract needs to call another contract on the blockchain like shown below,
image

I want to be able to set up a test to say something like:

engine.Mock<Contract>(c => c.Call(params).Return(true);
engine.ExecuteScript<MyContract>(c => c.DoSomething(otherParams));

So I want to be able to mock the Neo.SmartContract.Framework.Services Contract class in this instance

Another nice feature would be to be able to mock datastorages as well.

@SkyKarma
Copy link
Author

SkyKarma commented Mar 1, 2023

Another mock that would be nice to have is Neo.SmartContract.Framework.Services.Runtime,
I want to be able to mock the Time,

Basically be able to mock anything that is in the Neo.SmartContract.Framework which I do not have control over :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant