Project
ReSharper
Priority
Critical
Type
Bug
Fix versions
6.1
State
Duplicate
Assignee
Victor Kropp
Subsystem
No subsystem
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Mikhail Filippov
    12 months ago (28 Apr 2011 19:41)
  • Updated by   Victor Kropp
    5 months ago (05 Dec 2011 22:18)
 
RSRP-260304 Resharper cannot run test with using Moles.
34
Issue is visible to: All Users
  The issue is visible to the selected user group only
Resharper 6.0.2136.89 EAP cannot run test with using Moles. I get error:

Initialization method KassaFrontend.Tests.RequestHandlerTests.Setup threw exception. Microsoft.Moles.Framework.Moles.MoleInvalidOperationException: Microsoft.Moles.Framework.Moles.MoleInvalidOperationException: Moles requires tests to be IN an instrumented process.

In Visual Studio Unit Test, add the following attribute to your unit test method:

[TestMethod]
[HostType("Moles")] // add this attribute
public void Test()
{ ... }

Extensions are also available for most unit test frameworks. Please refer to the Moles manual.

Visual Studio test runner working correct.
Comments (18)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Jura Gorohovsky
  Jura Gorohovsky
19 May 2011 18:26
12 months ago
Laurent Barbisan
  Laurent Barbisan
25 May 2011 15:47
12 months ago
It would be a great fix, why ? because only two mock framework allow static/non virtual method mocking :
  • TypeMock, which is not free
  • Moles, which is free and from Ms
Tomas Lycken
  Tomas Lycken
11 Jul 2011 13:28
10 months ago
I would love it if this feature came soon - preferably as soon as in an update to my copy of R# 6 =)

Is there any decision taken on if and when this feature will be added to R#?
project Moles
  project Moles
24 Aug 2011 19:35
9 months ago
When its gonna happen?
leo_nsantana
  leo_nsantana
31 Aug 2011 07:40
8 months ago
Please....
Bit Mask
  Bit Mask
14 Oct 2011 00:46
7 months ago
bumping this... Really needing this fix.
chafnan
  chafnan
14 Oct 2011 18:24
7 months ago
Add one vote for me
Phil Carbone
  Phil Carbone
24 Oct 2011 18:26
7 months ago
+1
Jeff McKenzie
  Jeff McKenzie
31 Oct 2011 22:21
6 months ago
Love the R# test runner, but right now I can't use it.
Michael Marsh
  Michael Marsh
08 Nov 2011 21:29
6 months ago
Bump... would REALLY like this!
Heather Miller
  Heather Miller
09 Nov 2011 00:23
6 months ago
+1
Paul
  Paul
28 Nov 2011 14:30
5 months ago
Please fix!
Tomas Lycken
  Tomas Lycken
30 Nov 2011 17:24
5 months ago
I find it interesting that this issue was closed as a duplicate, referring to another issue submitted after this one... :P
Victor Kropp
  Victor Kropp
30 Nov 2011 17:47
5 months ago
Tomas, this issue is fixed. Fix will be available in the next EAP build. No worries!
Bit Mask
  Bit Mask
01 Dec 2011 03:39
5 months ago
Where would I access an EAP build so I can test this fix?
Dmitri Nesteruk
  Dmitri Nesteruk
01 Dec 2011 12:33
5 months ago
@Bit Mask: you can find the ReSharper 6.1 EAP builds here: http://confluence.jetbrains.net/display/ReSharper/ReSharper+6.1+Nightly+Builds
Laurent Barbisan
  Laurent Barbisan
05 Dec 2011 20:28
5 months ago
Hi,

I've just tested it using Build 6.1.22.27 on 2011-12-04T22:07:08.

Did this issue was fixed on MSTest only, or for Nunit test too ? Because it's seems it doesn't works for nunit (I didn't test for mstest), Is there any thinks to do ?
Victor Kropp
  Victor Kropp
05 Dec 2011 22:18
5 months ago
Moles is currently supported for MSTest only. See RSRP-184235 for the related NUnit request.