开发者

Unit testing ProfileBase in ASP.Net

I need to implement my own Profile properties and was going to inherit from System.Web.Profile.Profile开发者_JAVA百科Base to achieve this.

What I don't understand is how to best unit test this Profile class in isolation without hitting the database.


I came across this situation today and found your question while trying to find an answer.

What I have ended up doing is wrapping up all calls to ProfileBase in a wrapper class, and mocking out the wrapper class using this pattern which talks specifically about Rhino Mocks

Not sure this will help you as it was a few months ago now since you asked the question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜