How can I run Moq tests with Visual Studio 2010 Express - visual-studio-2010

I have installed VS2010 Express and C# Express Edition and MoQ.
I would like to know how can I execute the MoQ tests in class library without using the paid for version of VS2010?
I know NUnit has a UI, does MoQ have something similar, or is it just not possible?

In whatever project you wrote unit tests for NUnit, just add a reference to the Moq dll and you should be able to code the stubs/mocks there just fine. There is no UI for Moq. However, with the reference added to the unit test project, when you use the NUnit UI it will execute the code that uses Moq.

You should have no problem at all using Moq with Visual Studio 2010, whichever edition it is you're using. Moq is a mocking framework, not a test framework. You don't write Moq test, you write tests with a unit test framework like NUnit, MBUnit, etc. that use objects (classes, interfaces, etc) mocked (simulated) with Moq.
I assume we're talking about this Moq, aren't we?
In case we are, you might want to take a look at Moq's Quick Start page.

Related

What is the difference between starting tests using ReSharper and MSTest?

I have standard MSTest project in VS2010, .Net4. I can run tests by Test->Run... or by ReSharper->Unit Tests->Run Unit Tests.
There must be some different because tests passes only in ReSharper. I'm writing tests for class that uses Office Interop Excel.
ReShrper has default settings, VS also.
What is the basic difference between them?

Can VS2010 generate NunitTest cases?

There is option of Create Unit Tests in VS2010.
It creates a separate test project and uses MS test frame work. Is it possible for configure VS to use Nunit framework to create unit test cases?
From what i know Visual Studio generates only MSTests. But there are many commercial tools (You can always evaluate :)) which are quite helpful.
For example:
Other topic
Parasoft dotTEST
Probably by your own You will find few more.

NUnit debugging with VWD 2008 Express

How can I do this?
Is it even possible?
I only see online tutorials for setting up debugging with NUnit for non express versions or for visual studio.
I have setup NUnit, I just can't seem to debug with it.
One trick is to change the class library project containing the tests to a console application and then just create a main method for it.
Easy and effective.

Is it possible to integrate NUnit with VB.net Express Edition? Which is the best way?

I'm a Java Developer wich is learning VB.net for a small project. While coding in Java, we don't have to think a lot about how to integrate our IDE with our unit test framework because most of the IDEs already area integrated.
But now that I'm working on a project which the main requirement is to use VB.net Express Edition, is it possible to integrate this IDE with NUnit? How can I do that? Is there a better practice for this task? What should I do?
No, we can't opt to use Visual Studio, only the Express Edition of VB.net
You can add a test project, reference the nunit.framework DLL. If you can set the startup program in express (via project properties), you can set the startup program for the test project to the NUnit framework GUI. I wasn't sure if express supported that...
Additionally, you can run NUnit stand-alone; open NUnit, point to the test project DLL, and NUnit refreshes as you recompile.
HTH.

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 but they aren't integrated into the IDE.
If you have a look at TestDriven.NET and Gallio, they both have test runners that integrate to the IDE and allow the use of other testing frameworks.
If you are adverse to spending a little this is just on of the many benefits of ReSharper. (r#)
Not sure MS would want to encourage us to use another one unfortunately.
Kindness,
Dan
Visual Studio does provide the concept of custom test adapters that would allow custom test frameworks to execute under the MSTest platform. That is, tests for those frameworks would appear in the Test List Editor, etc.
The developers of the custom frameworks would have to develop a VSPackage that would find and provide tests to MSTest. Unfortunately, there's a lot of work involved.
TestDriven.NET, Resharper (and several others) provide their own VSPackage to provide their own Tool Window, but do not integrate directly with MSTest.
Looks like this is coming to Visual Studio 11

Resources