mbunit

Equivalent of assert.warning in mstest ?

is there a MsTest Equivalent of Assert.Warning in MbUnit ? ...

Are there any plans for Microsoft to support testing frameworks other than MSTest?

It seems like you should be able to configure your preferred unit testing framework as a plugin to Visual Studio/Team system like you can with SourceControl providers. Is anyone aware of an effort within microsoft to allow for swapping out MStest for nUnit, mbUnit or others. Obviosly nothing prevents me from using these other frameworks...

Is this mbunit test really doing anything significant?

[Test] public void TestUserProfileInsert() { using (new TestBindingsWrapper("TestBindings", "", new TestModule())) { // Setup the mock the dataprovider MyMocks.MockDataProvider.Setup(x => x.InsertUserProfile(It.IsAny<IUserProfile>())).Returns(1); IUserProfile up = new UserProfile(); IUserProfileManager manager =...

When unit testing, do you have to use a database to test CRUD operations?

When unit testing, is it a must to use a database when testing CRUD operations? Can sql lite help with this? Do you have to cre-create the db somehow in memory? I am using mbunit. ...

[.Net] Is it possible to change the way unit tests are invoked?

My guess is that the current semantics of unit testing involve actually calling the method, i.e., if I have a method MyTest() then that's what gets called. My question is this: is it possible to somehow change the pipeline of the way tests are executed (preferably without recompiling the test runner) so that, say, instead of calling the ...

How To Centrally Initialize an IOC Container in MbUnit?

We currently have a suite of integration tests that run via MbUnit test suites. We are in the process of refactoring much of the code to use an IOC framework (StructureMap). I'd like to configure/initialize the container ONCE when the MBUnit test runner fires up, using the same registry code that we use in production. Is there a way o...

Using MBUnit to test values against a database

I need to test a class who's return value depends on values from a database. I could just hit the database in the unit test but those values could change. Is there a standard solution to this? ...

Can a Gallio/MbUnit Test be Ran without Installing Gallio?

Hi all, I've installed TestDriven.Net in Visual Studio 2008 and when I run a mbunit test from TD.Net I get this message: It looks like you're trying to execute a Gallio/MbUnit unit test. For Gallio v3.0.6 build 787 / Gallio v3.1 build 313 or above (recommended): Please ensure that the directory containing your 'MbUnit.dll' re...

Using WatiN through MbUnit to test ASP .Net MVC web application

I am trying to apply some WatiN UI tests to my new ASP .Net MVC application, running the WatiN tests through MbUnit, but am having some difficulties. If I follow the instructions (exactly) on this page, then the google homepage loads, up the text is inserted, the search is done and the test passes. (no problem here). However, when I si...

how to unit test an email rule

I download an employee's email into a table, I then take that collection of emails I just downloaded and run a bunch of rules on them. e.g. if email from [email protected], route the email to folder1. How could I write a unit test for this process? Would I have to create a dummy collection of emails, and then right a rule for each one? I...

Gallio and MbUnit in NAnt

I am trying to use Gallio (v3.1)/MbUnit/NCover to run a unit test in my C# code, as part of the build process for my continuous integration system. I can get Gallio.Echo.exe to execute the tests and output an XML file (albeit it does seem to be checking all .dll files in the folder == approx. 6.5MB .xml file!!), but when I try to get NC...

How does one create a global testfixturesetup routine with MBUnit and C#?

I'm using MBUnit for my test project and have a setup routine that must run before several different test fixtures can run properly. Currently in each TestFixture I've got the [TestFixtureSetup] attribute on a routine that performs this, but the logic is unnecessarily duplicated in each individual test fixture. What method is used to c...

Run mbunit 3.1 tests in resharper 4.5

I have earlier used mbunit 2 and with this plugin I could get my tests to run in the resharper test dialog. Now with mbunit 3.1, I read that I didn't need any external plugin. So I donwloaded Gallio and got the new MbUnit.dll. Added a reference to it in my test-project. Now it looks correct in visual studio. I've got the green/yellow c...

how to specify a setup method should only be run once for all tests in mbunit?

so far, the SetUp property specifies the setup method should be run once before every test method, is there a property can specify the setup method should be run only once for all test method? ...

Choosing a test platform for .NET - MbUnit or the one by Microsoft?

I have chosen these two as primary candidates. My thinking goes like this: MbUnit has had a nice start and enjoys a smart, dedicated team of developers. MSFT has many resources and can compete with MbUnit easily if they choose to do so. Which one do you believe I should bet on? ...

Is it possible to to execute code befor all tests are run?

Hi, I am writing integration tests.Now, before tests are run I want to setup the database with initial data.For this, I have created a separate project, which is run before test project is executed(using MSBuild file).But, I want to merge the db setup code in testproject, and have it executed before any tests get executed.I am using MBu...

Convert modelstate validation strings to array of objects

Still not comfortable with all the enumerables out there. I'm trying to do this: Assert.IsTrue(actionResult.ViewData.ModelState.IsValid, null, Enumerable.ToArray<object>(actionResult.ViewData.ModelState as IEnumerable<object>)); It's an mbUnit assert with the following signature. public static void IsTrue(bool actualValue, string me...

Setting up MbUnit for ASP.NET MVC

I am using Visual Web Developer 2008 Express with ASP.NET MVC 1.0. I would like to use MbUnit as a test framework so how would I set this up as a unit test project for an ASP.NET MVC web application? ...

How do I get Gallio.echo to run MbUnit Tests?

I have MbUnit tests that run if I load them into MbUnit.GUI.exe, however when I try to execute them from the Gallio.echo command-line tool I get 0 test available. I then loaded the assemblies into the Gallio GUI and the tests do not show. I am missing something with the Gallio set-up and the documentation is lacking to put it mildly. ...

How to get MSTest to work with Gallio/MBUnit?

How to get MSTest to work with Gallio/MBUnit? I am trying to get TeamCity to work with Gallio/MBUnit and also some legacy MSTest unit tests. The MSTest section fails with a "Exception has been thrown by the target of an invocation" error message. Problem seen with GallioBundle-3.1.397.0-Setup-x64.msi. ...