tags:

views:

158

answers:

3

I have a test project for a solution which involves an MVC web application and several class libraries. I am using mock objects and System.Web.Abstractions to avoid dependencies on ASP.NET intrinsic objects. But when I start my test project Cassini loads. If I immediately stop cassini all my tests still pass. So why does it load? It's not that it's a problem that it's loading. But if I'm doing everything right it seems like it shouldn't load. So what causes it to load when I run my tests?

A lot of changes are being made to the project and I haven't been working on it directly for a few days so I don't know exactly when Cassini started running.

A: 

It sounds like your tests are touching something outside of System.Web.Abstractions. What classes from the abstractions assembly are you touching? This information would be needed to determine why cassinin is loading.

Sean Chambers
Thank you, but I guess I'm just gonna have to dig in and find out specifically what is causing it to load. I can probably just do some poking around with a test project to see what finally causes it to load.
Mark J Miller
A: 

I don't do asp.mvc but seems a common scenario.

It is a wep app, no? Open project properties, select 'web' tab near bottom, select 'Don't open a page...' and UNcheck Debuggers:asp.net.

HTH, Sky

Sky Sanders
I'm no longer working on the project and so I can't verify wither your fix works for my problem, but I'll mark yours as the answer.
Mark J Miller
A: 

I was actually trying to find ways to run cassini as I run my unit test project. I was able to do this by setting up explicit project dependency to the web project.

i.e right click unit test project > project dependencies > tick web project.

For your case it could be undoing this. untick the web project. Hope that helps

ronaldwidha