Covering lambda expressions.

It seems that lambda expressions are not covered even though they are executed. The coverage explorer displays lambdas with their system generated names and with 0 coverage.

It also seems that the coverage is off. I can get complete coverage if I run dotCover on the individual test, but when I select the level above it and execute, I get zero coverage on the test themselves even though they pass successfully.

Obviously some quirks still to be hammered out.


Hello Tormod!
Lambda expressions' representation improvements are already planned for 1.0 release.
Regarding zero coverage: could you please try the latest nightly build? Does the issue still reproduce?
Also it is important to know your unit testing framework.



The unit test framework is MSTest.

I will see if the matter reproduces on the latest build if I can get Resharper to work again.

I am in the middle of a small crisis. After uninstalling dotCover, Resharper was no longer able to run unit tests at all. The the build is executed, unit test session screen pops up, the green horizontal progress bar at the top is filled, but the tests do not receive "pending" status nor do they execute. No matter how I try to execute them.
I do not recall the dotCover build number that I had installed.

Repairing resharper does not work.
Reinstalling resharper does not work.
Reinstalling newest build of dotCover does not work.

BTW: The email notification I got from your respons had the "reply-to" mailbox, which does not exist.



Hi Tormod.
dotCover plugin for ReSharper is installed dynamically each time the VS starts.
So if dotCover is uninstalled or disabled, it can't affect ReSharper.
It seems to be a MSTest issue. is our mailing robot for sending notifications.
I've sent you detailed info on how to investigate the issue.


I am experiencing a similar issue with lambda expressions ( Build )

The image  initial_code_highlight.PNG shows the code highlighted after running a unit test, you can see the lambda expression is highlighted red. The image coverage_report.PNG shows coverage report and the compiler generated constructor.

The weird thing is that if I toggle code highlighting off, then back on again, the expression is shown as covered (after_toggle_code_highlight.PNG). Then.. if I toggle off/on a second time, it is show as not covered. Repeatedly toggling off/on shows the expression as uncovered - covered - uncovered - covered ... etc.


Hello Damian,
Thank you for the feedback.
I've filed an issue for this:
You can track it's state.


Please sign in to leave a comment.