chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
This test fails:

[ img ]
Code for the above: http://pastebay.com/pastebay.php?dl=63679

What needs to be done to make it pass?
asked by Neil (27.7k points)

2 Answers

0 votes
Hi Neil,

Isolator AAA currently does not have a way to verify that an action was invoked.
Instead why don't you attach a new listener to that action and assert that it was called:
[TestMethod]
public void action_scenario_expected()
{
    bool wasCalled = false;
    Isolate.Fake.StaticMethods<A>();
    A.InteractWithFileSystem += () => wasCalled = true;
    A.InteractWithFileSystem();

    Assert.IsTrue(wasCalled);
}
answered by dhelper (11.9k points)
0 votes
Thanks dhelper, that method works.
answered by Neil (27.7k points)
...