Counterpart for NUnit attribute [SetUp()] in Visual Studio
I am "translating" a NUnit test to Visual Studios unit testing and I am wondering if the attribute [ClassInitialize()] in VS is equivalent to [SetUp()] in NUnit? ...
I am "translating" a NUnit test to Visual Studios unit testing and I am wondering if the attribute [ClassInitialize()] in VS is equivalent to [SetUp()] in NUnit? ...
Using NUnit and Moq, I am trying to wrap some tests around legacy code before I do too much more refactoring. I need to test that a method keeps looping until told to stop. Here is my idea how to do it: [TestCase] public void KeepsCallingDoSomethingUntilShouldIKeepGoingIsFalse() { var dal = new Mock<IDataAccessLayer>(); var sut = ...
Hi everyone, Writing test cases for my project, one test I need is to test deletion. This may not exactly be the right way to go about it, but I've stumbled upon something which isn't making sense to me. Code is like this: [Test] private void DeleteFruit() { BuildTestData(); var f1 = new Fruit("Banana",1,1.5); var f2 = new...
Hi, 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 p...
These three tests are identical, except that they use a different static function to create a StartInfo instance. I have this pattern coming up all trough my testcode, and would love to be be able to simplify this using [TestCase], or any other way that reduces boilerplate code. To the best of my knowledge I'm not allowed to use a dele...
I'd like to use NUnit to run unit tests in my plug-in, but it needs to be run in the context of my application. To solve this, I was trying to develop a plug-in that runs NUnit, which in turn will execute my tests in the application's context. I didn't find a specific documentation on this subject so I dug a piece of information here an...
How to solve this problem? I have this ProjectName.UnitTests.config file, and I did exactly what the documentation said: http://nant.sourceforge.net/release/latest/help/tasks/nunit2.html <?xml version="1.0" encoding="utf-8" ?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> ...
What is the easiest way to control Chrome (pc/mac) from an NUnit test? Things I want it to do: Use a proxy server I specify not bring up any dialog boxes that need to be clicked. open a url I specify close With firefox I can do all these things by writing out a temp firefox profile, and telling firefox to use it. If someone knows a...
I'm using NUnit for testing back-end. Unit tests are being executed while building (I'm using TeamCity for continuous building). Now I hove to test front-end (Silverlight 4.0). Because the tests are being executed while building, I have to simulate browser (TypeMock - is not free, isn't it?) could I use NUnit.Mocks somehow?. How to use...
I am writing a new test suite for the company to test a very complex ASP.NET application which is heavily AJAX driven. We have decided to use Selenium (Grid & Remote Control) and Nunit to run these tests. The actually tests are dynamically created at run time from a spreadsheet. Each Column in an excel spreadsheet relates to a new test...
I'm trying to write a simple method that receives a file and runs it using NUnit. The code I managed to build using NUnit's source does not work: if(openFileDialog1.ShowDialog() != DialogResult.OK) { return; } var builder = new TestSuiteBuilder(); var testPackage = new TestPackage(openFileDialog1.FileName); var directoryName = Path...
I'm using Unit-2.5.5.10112. How can I use also NBehave, if it has dependency on an older version of NUnit? Should I ignore NBehave? ...
I am developing an app that relies heavily on an external dll, my app needs to support new versions of the dll as well as being backwards compatible with the old ones. Are there any good ways to have my unit tests target all of these different dll versions without the need to rewrite the tests as soon as a new version of the api is rel...
I'm using VS2010. Silverlight 4, NUnit 2.5.5, and TypeMock TypemockIsolatorSetup6.0.3.619.msi In the test project MVVM is implemented, PeopleViewModel is a ViewModel which I want to test. Please advise if you use other products for unit testing of MVVM Silverlight. Or please help to win this TypeMock. TIA This is the code of the test:...
I'm trying to make test for this function let extract_one_rule (rule:Rule.t<'a,'b>) = let rec expand = function |PAlt (a,b) -> expand a @ expand b |PSeq (a,b) -> let wrap = List.map (fun x -> (x.rule, fun r -> {x with rule = r})) a |> List.unzip in ...
In a test that contains some asserts, for example: Assert.AreEqual(1,1); Assert.AreEqual(2,1); Assert.AreEqual(2,2); is it possible to let the test keep running after it fails at some point? In the example, first condition is true, second fails and the test stops. I'd like to evaluate also the following condition. ...
Is there something like that in MSTest? Thanks ...
I was following a tutorial but I can't find the option to run tests. ...
Hi all! I have written unit tests under NUnit that use TestFixtures with different parameters. Now, when I run tests, I want to see with which parameters test has been passed and with which hasn't. Unfortunately, ReSharper shows only "Test failed: Child test failed" and no more information. Is there any way to see which parameters hav...
I am trying to run some unit tests using NUnit while I have the project open, and VS 2010 cannot rebuild the project while the assembly is loaded in NUnit. I have looked around and haven't found any solutions that seen to fix it. I can close NUnit, then the project builds fine. This is a the same solution based on Rob Conery's BDD demo f...