Ejemplo n.º 1
0
    public override void PCLMock()
    {
        var mock = new ThingMock();

        mock.When(x => x.DoSomething());
        mock.DoSomething();
        mock.Verify(x => x.DoSomething()).WasCalledExactlyOnce();
    }
Ejemplo n.º 2
0
    public override bool PCLMock()
    {
        var called = false;
        var mock   = new ThingMock();

        mock.When(x => x.DoSomething()).Do(() => called = true);
        mock.DoSomething();
        return(called);
    }