xunit.net

How to write a test for accounts controller for forms authenticate

Trying to figure out how to adequately test my accounts controller. I am having problem testing the successful logon scenario. Issue 1) Am I missing any other tests.(I am testing the model validation attributes separately) Issue 2) Put_ReturnsOverviewRedirectToRouteResultIfLogonSuccessAndNoReturnUrlGiven() and Put_ReturnsRedirectResu...

Reharper runner plugins for xunit and mspec simultaniously

I have successfully used the Resharper 4.5 runner for xunit tests in vs2008. Now I want to try out MSpec and I want to use the Resharper 4.5 runner for MSpec. But I have them both installed I get an error message when starting Visual Studio, that a plugin can not be loaded, because there is already a plugin with the same name loaded. Is...

Has anyone resharper 5 with xunit running?

I installed the latest binaries from http://xunitcontrib.codeplex.com/releases/view/35006 and followed the suggestions from http://xunitcontrib.codeplex.com/Thread/View.aspx?ThreadId=79225 because the linked installation instructions are out of date (basically there are more libs to copy to the plugins dir) Now my resharper shows t...

How to get SpecFlow working with xUnit.net as the test runner

I'm trying to use xUnit.net as the test runner for SpecFlow. The SpecFlow 1.2 binaries from the official download area don't contain an xUnit.net provider but the master branch on GitHub has one, so I build SpecFlow.Core.dll from that. I'm using xUnit.net 1.5. However, when I change the unitTestProvider name in the app.config in my spec...

Unit Testing (xUnit) an ASP.NET Mvc Controller with a custom input model?

I'm having a hard time finding information on what I expect to be a pretty straightforward scenario. I'm trying to unit test an Action on my ASP.NET Mvc 2 Controller that utilizes a custom input model w/ DataAnnotions. My testing framework is xUnit, as mentioned in the title. Here is my custom Input Model: public class EnterPasswor...

how often should the entire suite of a system's unit tests be run?

Generally, I'm still very much a unit testing neophyte. BTW, you may also see this question on other forums like xUnit.net, et cetera, because it's an important question to me. I apoligize in advance for my cross posting; your opinions are very important to me and not everyone in this forum belongs to the other forums too. I was ...

NUnit SetUpFixture attribute equivalent in xUnit?

In nUnit, SetUpFixture allowed me to run some code before any tests. Is there anything like that when using xUnit? From nUnit documentation: This is the attribute that marks a class that contains the one-time setup or teardown methods for all the test fixtures under a given namespace. ...

TestCase scripting framework

Hey guys, For our webapp testing environment we're currently using watin with a bunch of unit tests, and we're looking to move to selenium and use more frameworks. We're currently looking at Selenium2 + Gallio + Xunit.net, However one of the things we're really looking to get around is compiled testcases. Ideally we want testcases th...

TeamCity build does not run new XUnit tests

I'm using TeamCity 5 with Git VCS and Visual Studio 2010 SLN build runner. My solution has a class library proj containing a number of XUnit 1.5 tests. The post build event on this project runs the tests $(SolutionDir)libs\XUnit-1.5\xunit.console.exe $(SolutionDir)MyTestProj\$(OutDir)\MyTestProj.dll This works fine for running all my ...

Attribute cannot be repeated in C++/CLI but OK in C#?

I'm getting error C3095: 'Xunit::Extensions::InlineDataAttribute': attribute cannot be repeated in C++/CLI code but not C#. xUnit.net looks like the answer to my prayers - a modern unit test framework with GUI working with C++/CLI. However, using their approach to parameterised testing gives me the error C3095 as shown below. Any ideas...

How to isolate a bad COM component (HP Quality Center 10.0) from a .Net application when performing integration tests

I'm currently working on some .Net based software (.Net Framework 3.5 SP1) that integrates with HP Quality Center 10.0 through it's COM Client API (often referred to as TDApiOle80 or TDApiOle80.TDConnection). We are using XUnit 1.6.1.1521 and Gallio 3.1.397.0 (invoked from an msbuild file) We go through a process of: Creating a conne...

Getting started with automated integration/unit testing in an existing code base

Background: We have been handed over a very large codebase (1.4 million lines) that is primarily in C#. The application consists primarily of asp.net 2.0 style asmx web services accessing data in a SQL server 2008 database and also in various XML files. There are no existing automated tests in place. We have an automated nightly build in...

Why this xUnit test fails?

Assert.Equal(1000000.0, table.Convert("g", "mcg", 1.0)); // Pass Assert.Equal(2000000.0, table.Convert("g", "mcg", 2.0)); // Pass Assert.Equal(3200000.0, table.Convert("g", "mcg", 3.2)); // Fail // The failing one is equal to doing the following calculation, which fails also: Assert.Equal(3200000.0, 3.2 * 1.0 / (1.0 / 1000000.0)); // Fa...