Archive for the ‘Unit Test’ Category

all unit tests failing! debug won’t step in!

April 26, 2017

the sky is falling!

really, not being able to debug/step into is a shock to someone who uses visual studio day in / day out

what I had done yesterday to cause this was to change the copy local to “false” on the dll being tested.

that did it.

the exception message was “System.IO.FileNotFoundException: Could not load file or assembly”

Advertisements

stateless unit testing (when I wanted several to run together) … MemoryCache

July 15, 2014

Unit Testing – wow, I spent two days and the issue seems to have been just my misunderstanding of how stateless each unit test is.
I was trying to test a push and a pull from a local cache storage (instead of using web application cache, I switched to MemoryCache (.Net 4).

The problem was that I was saving in one test and trying to read in another test. And it’s an unfortunately long story, but when I finally just made one test method which saved and then read, it all worked.

I knew that I couldn’t count on tests being run in a certain order, but I was trying to run things by hand from Test Explorer. Sometimes it would work, but I just shot at least 12 hours trying to get something to work that I should have just spent 3 minutes on doing it the easy way.