public override int PCLMock()
    {
        var mock = new ThingMock();

        mock.When(x => x.Zero());
        return(mock.Zero());
    }
    public override void PCLMock()
    {
        var mock = new ThingMock();

        mock.When(x => x.DoNothing());
        mock.DoNothing();
    }
Exemplo n.º 3
0
    public override int PCLMock()
    {
        var mock = new ThingMock();

        mock.When(x => x.One()).Return(1);
        return(mock.One());
    }
    public override void PCLMock()
    {
        var mock = new ThingMock();

        mock.When(x => x.OneParameter(0));
        mock.OneParameter(0);
    }
Exemplo n.º 5
0
    public override void PCLMock()
    {
        var mock = new ThingMock();

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

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