Resharper Bug with TDD

Greetings,

I love the product. Here's something to work on:

It appears your unit testing solution is creating a shadow copy of the assemblies to C:\Documents and Settings\[user]\Local Settings\Application Data\assembly

I am testing with one assembly on another assembly. I first make the test fail. Then I change the code in the other assembly. When I run unit tests (under any NUnit solution by the way), it doesn't seem to copy the latest dependant assembly to the shadow copy and thus I get stale debugging and inaccurate results. Here is a link that explains this further:
http://weblogs.asp.net/mreynolds/archive/2003/08/11/23576.aspx

As a workaround, I deleted the assembly folder and it refreshed it ok the next time around.

Thanks,
Michael Hedgpeth

4 comments
Comment actions Permalink

What TDD system did you used before installing ReSharper?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Michael Hedgpeth" <michaelhedgpeth@fairisaac.com> wrote in message
news:1185986.1121986012983.JavaMail.javamailuser@localhost...

Greetings,

>

I love the product. Here's something to work on:

>

It appears your unit testing solution is creating a shadow copy of the
assemblies to C:\Documents and Settings\[user]\Local Settings\Application
Data\assembly

>

I am testing with one assembly on another assembly. I first make the test
fail. Then I change the code in the other assembly. When I run unit
tests (under any NUnit solution by the way), it doesn't seem to copy the
latest dependant assembly to the shadow copy and thus I get stale
debugging and inaccurate results. Here is a link that explains this
further:
http://weblogs.asp.net/mreynolds/archive/2003/08/11/23576.aspx

>

As a workaround, I deleted the assembly folder and it refreshed it ok the
next time around.

>

Thanks,
Michael Hedgpeth



0
Comment actions Permalink

More ideas how to solve you problem: as I understand, the source of your
problem that you cannot find the right base path to search for another
assembly.

You could do it by 2 ways:
1) Use GetType().Module...... property. It will give the original assembly
path, not shadow-copied
2) use Environment.CurrentDir (in build 201 there is bug here, but it is
already fixed in 202, which will be available shortly)

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Michael Hedgpeth" <michaelhedgpeth@fairisaac.com> wrote in message
news:1185986.1121986012983.JavaMail.javamailuser@localhost...

Greetings,

>

I love the product. Here's something to work on:

>

It appears your unit testing solution is creating a shadow copy of the
assemblies to C:\Documents and Settings\[user]\Local Settings\Application
Data\assembly

>

I am testing with one assembly on another assembly. I first make the test
fail. Then I change the code in the other assembly. When I run unit
tests (under any NUnit solution by the way), it doesn't seem to copy the
latest dependant assembly to the shadow copy and thus I get stale
debugging and inaccurate results. Here is a link that explains this
further:
http://weblogs.asp.net/mreynolds/archive/2003/08/11/23576.aspx

>

As a workaround, I deleted the assembly folder and it refreshed it ok the
next time around.

>

Thanks,
Michael Hedgpeth



0
Comment actions Permalink

Eugene,

I am having the same problem, and this workaround is unacceptable. I don't feel like I'm "developing with pleasure" if I need to write my unit test code differently than any other code. Writing unit tests that operate in a completely different manner than the "normal" code consuming the components is counter to the principals of unit testing in general.

Why is ReSharper unable to refresh it's cache when an assembly changes?

Thanks,
David Sidlinger


/snip

You could do it by 2 ways:
1) Use GetType().Module...... property. It will give
the original assembly
path, not shadow-copied
2) use Environment.CurrentDir (in build 201 there is
bug here, but it is
already fixed in 202, which will be available
shortly)

/snip

0
Comment actions Permalink

Please could you clarify what your problem is?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"David Sidlinger" <no_reply@jetbrains.com> wrote in message
news:7598994.1146669944989.JavaMail.itn@is.intellij.net...

Eugene,

>

I am having the same problem, and this workaround is unacceptable. I
don't feel like I'm "developing with pleasure" if I need to write my unit
test code differently than any other code. *Writing unit tests that
operate in a completely different manner than the "normal" code consuming
the components is counter to the principals of unit testing in
general.*

>

Why is ReSharper unable to refresh it's cache when an assembly changes?

>

Thanks,
David Sidlinger

>
>

/snip

>> You could do it by 2 ways:
>> 1) Use GetType().Module...... property. It will give
>> the original assembly
>> path, not shadow-copied
>> 2) use Environment.CurrentDir (in build 201 there is
>> bug here, but it is
>> already fixed in 202, which will be available
>> shortly)

/snip



0

Please sign in to leave a comment.