vanderkleij / Smocks

Smocks is a library for mocking the normally unmockable. It can mock static and non-virtual methods and properties, amongst others.
MIT License
114 stars 26 forks source link

Test run successfully. Code coverage report show that code was not covered. #27

Open lcc101361 opened 8 years ago

lcc101361 commented 8 years ago

Hello genius, I'm currently using Smocks to isolate my c# unit test and mock up some static methods when run test. this is a great tool. No open source lib could mock C# static method and static class before. I could run my unit test successfully. but when I use open cover to generate report. It show me my unit test not covered that code.

Can you please give some advise or confirm it's should just like that?

Thanks in advance.

vanderkleij commented 8 years ago

Hello! Thanks for the kind words and reporting an issue. This is probably related to #1.

Due to all the hackish stuff going on under the hood of Smocks, Visual Studio is having a hard time tracking what code is currently executing. As a result, breakpoints and code coverage are not working properly. I've looked into this in the past, and haven't been able to pinpoint the problem. Sadly, I therefore don't expect this to be fixed anytime soon.

If anyone reading this has any thoughts about what's causing this issue and #1, feel free to jump in!

lcc101361 commented 8 years ago

Hi vanderkleij,

Reviewed your last post. Yes Looks this question is a duplicate one. I got it. Thanks for your response.

Best regards