score:1

Accepted answer
public void getdatalinq_alwaysinvokesdequeuetestproject()
{
    //create a fake implementation of idatarepository
    var repo = new fakefilleddatabaserepository();  
    var sut = new mypageclass();
    //stick in the stub:
    sut.settestrepo(repo);
    //call the method
    sut.getdatalinq();
    //verify that repo.dequeuetestproject() was indeed called.
    var expected=1;
    assert.areequal(expected,repo.callcount);
}

score:0

    [test]
    public void test_myrepository_dequeuetestproject()
    {
        // add your unit test using myrepository
        var r = new myrepository();

        var commandmessage = r.dequeuetestproject();
        assert.areequal(commandmessage, new commandmessage("what you want to compare"));
    }

Related Query

More Query from same tag