When trying to run my unit test under Chess, it get the following error:
Hosting rules specify that the test
type 'Unit Test' cannot run in the
host adapter 'Chess'. To run this test
in 'Chess', change the hosting rules.
To use the default test host for tests
that cannot be run in the specified
host adapter, change the te...
Hi
Today I ran into a problem where I cannot call the ControllerContext in my Controller, within the MS Unit Test method when accessing via a private method. For example
//This is my controller and private GetUsers() method
public class SampleController : Controller
{
private IEnumerable<Users> GetUsers()
{
...
I have used a bit of MS VS2008 integrated Unit Testing framework for writing unit test, but not that extensive, any suggestions which framework will work best for web based applications developed using ASP.NET.
...
Hi,
I'd like to know what would you propose as the best way to unit test aspect-oriented application features (well, perhaps that's not the best name, but it's the best I was able to come up with :-) ) such as logging or security?
These things are sort of omni-present in the application, so how to test them properly?
E.g. say that I'm...
Currently reading "The Art of Unit Testing" by Roy Osherove. I'm about half way through it and so far it's an awesome book. I'm going to ask everyone to leave IOC containers out of this discussion. He only briefly mentions them (actually states IOC are out of the scope of the book which I don't understand and is one of the few places whe...
Hi,
I am working on an ASP.NET WebForm application using MVP pattern. For every Web Form, there is a Presenter class associated to handle UI and Business logic. However, I had problem when writing unit tests for Presenters, since session values are used in presenters. And there is no HTTP context exists during execution of the unit tes...
With the framework that Visual Studio 2008 has, am I missing anything great by NOT using an external tool like NUnit? From what I can tell it seems like using NUnit would be more of a hassle with manually creating test classes and methods versus the right clicking native to the IDE. That being said, am I missing features that NUnit pro...
I want to write color text to the Visual Studio output window from c#. I want to output red code from my unit tests.
...
I'm trying to run some unit tests on a wicket page that only allows access after you've logged in. In my JUnit test I cannot start the page or render it without setting the session.
How do you set the session? I'm having problems finding any documentation on how to do this.
WicketTester tester = new WicketTester(new MyApp());
((M...
I am performance integration testing where I fire up the ASPX pages using WatiN and fill the fields and insert into the database. There are couple of problems that I am facing.
1) Should I use a completely separate database for integration testing? I already gave db_test and db_dev. db_test is for unit testing and is cleared after each...
In the past it has been a real PITA to unit test custom Code Analysis rules. I haven't found anything out there that shows the situation to be any different in 2010, but I'm not giving up. If anyone knows if this is "possible" in 2010 please respond - thanks!
...
Hi guys.
I'm developing a website in asp.net webforms with 3 layers; UI, BLL and DAL
The website is already developed, but i like have more control about the unit tests of each form
Pass specific values at specific inputs for i see, if application survives or not.
I already study about NUnit but in webforms in UI layer how can apply t...
I'm trying to unit test an observer in rails but none of its callbacks are being invoked. I'm sure I have something configured incorrectly but just to be sure I was wondering if this may be a Rails limitation during unit testing.
I've looked at the docs and they don't mention anything.
...
I have created a custom msmq service with WCF, which uses a custom binding as it needs to do some custom logic at the channel layer, where it calls another wcf service. The service is going to be a core pience of functionality for our systems for at the the next few years. i want to do what I can to make sure the service is robust, but, ...
Hello.. I know that height() method of jquery returns a number unitless...
How can i be sure that this number is in the unit i want?
I want to work with centimeter cm any ideas?
...
I have developed a basic Chat application in Java. It consists of a server and multiple client. The server continually monitors for incoming messages and broadcasts them to all the clients. The client is made up of a Swing GUI with a text area (for messages sent by the server and other clients), a text field (to send Text messages) and a...
Yesterday, I decided to install the newest NCover version (3.4.2). However, when I ran it on my existing .ncover configuration file, the NCover output suddenly reported that all my MSTest tests failed. Of course those tests succeed when ran within Visual Studio. Because of this, NCover isn't able to determine any coverage.
Somehow the o...
Hello all, I come from a Java/Eclipse background and I fear that I am spoiled by how easy it is to get JUnit and JMock running in Eclipse, and have that GUI with the bar and pass/fail information pop up. It just works with no hassle.
I see a lot of great options for testing in C# with Visual Studio. NUnit looks really nice because it co...
I'm using VSTS 2K8 and I've set up a Unit Test Project. In it, I have a test class with a method that does a simple assertion. I'm using an Excel 2007 spreadsheet as my data source.
My test method looks like this:
[DataSource("System.Data.Odbc",
"Dsn=Excel Files;dbq=|DataDirectory|\\MyTestData.xlsx;defaultdir=C:\\Tes...
I'm using SqlCacheDependency in asp.net application, and i'm using HttpRuntime.Cache to cache items. and the application works well only when i debug the web application, but the HttpRuntime.Cache will not be notified when some data changes from the db when i debug the application in the unit test mode.
Anyone have suggestions to make H...