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();
    }
예제 #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);
    }
예제 #5
0
    public override void PCLMock()
    {
        var mock = new ThingMock();

        mock.When(x => x.DoSomething());
        mock.DoSomething();
        mock.Verify(x => x.DoSomething()).WasCalledExactlyOnce();
    }
예제 #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);
    }