Jump to content

Recommended Posts

Posted

So I have an already developed set of code which I want to test.

 

At the moment the code's going all the way down to a database to get some details that I'd like to be able to insert by hand. Initially I thought "ah ha! I'll try mocking" (never having tried it before) but NMock won't let me, as I'm not trying to implement an interface in a dummy version. There's already a class in existence, so nmock says I can't play. (Which I should have realized earlier, but I didn't have time to read all the documentation before having a stab at getting it going.)

 

I know that I just need to set a few properties, and block a call to a function I don't need, is there any way to mock a single function, or replace a function at test time with a crippled version?

 

The alternative, deploying a test database onto every machine running tests,*would be extremely tedious.

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...