unit-testing

Has anyone unit tested a HttpModule in ASP.NET using rhino Mocks framework?

If so can you pls supply a sample test.... ...

Pragmatic Unit testing

I'm writing an application using an MVC framework which takes care of a lot of the boilerplate wiring of our system. Specifically - application is written in Flex, using the Parsley MVC framework. However, the question is not language specific. In my Presentation Model / Code-Behind / View-Controller (whatever you want to call it), I ...

Troubles with simple mocking using RhinoMocks .NET

I am trying to experiment with RhinoMocks, where I have to say I am a newbie and probably I don't get some obvious thing here. What I'm doing is something like : [TestMethod] public void SaveResponsibleUserFromChangeset() { var action = mocks.StrictMock<GenomeAction>(); var changeset = new ActionChangeset(); ...

Netbeans: Is it possible to use newer version of JUnit than the bundeled one?

Hello, everyone! Has anyone tried to use a newer version of JUnit in Netbeans? Netbeans currently has 4.5 bundled. Newest is 4.8 or so. Could a newer version of JUnit break compatibility with Netbeans' unit test integration? Or do something else negative? ...

How can I mock a collection using Moq

I'm brand new to unit testing and mocking and still wet behind the ears. I'm using the Moq framework and I need to mock a collection such that it yields a single member with a value I supply. The collection class in question is a System.Configuration.SettingsPropertyCollection, which contains SettingsProperty objects. In turn, the Sett...

Vb6 UI Automated Testing tools?

What vb6 UI automated testing tools are available? Additionally, would you rate the tools listed from 1-10, where ten means that its the most amazing tool ever and one means that its almost not worth listing. ...

what is "upstream" program?

I've read "upstream" program from here ... http://xunitpatterns.com/Back%20Door%20Manipulation.html If the data store is external to the SUT, such as in a relational database, the Data Loader can be "just another application" that writes to that data store. It would use the database in much the same way as the SUT but it would get its ...

Dead-simple introduction to TDD (Test driven development)

Hello. Even though there are plenty introductions to TDD (even in PHP, my primary programming language now), I'm feeling a bit stuck about it. My friend introduced me TDD a while ago, but I wasn't actually able to understand it - what's the point in writing tests to everything first - even the simplest tasks - when in the end, it looks...

TDD: Unit testing focus

Could TDD be oriented to another kind of testing different from unit testing? ...

Specification Pattern Unit Tests

We have recently adopted the specification patterns for validating domain objects and now want to introduce unit testing of our domain objects to improve code quality. One problem I have found is how best to unit test the validate functionality shown in the example below. The specification hits the database so I want to be able to mock...

.NET Unit Testing - How to Test applicationSettings

I have a class library that is using application settings to determine the behavior of a particular method. I realize that the argument could be made that this is a Bad Thing, but we know that the behavior of the site is going to change about a week after launch (no real definitive time), and it will be easiest to just change the sett...

How to write unit test and not get bored in development of FOSS project?

Hello, I'm developing cross-platform project that would support : Four C++ compilers - GCC, MSVC, SunStudio, Intel, Five Operating Systems: Linux, OpenSolaris, FreeBSD, Windows, Mac OS X. I totally understand that without proper unit testing there is no chance to perform proper QA on all these platforms. However, as you all know wr...

StructureMap on unit testing

I hawe a webproject where i use StructureMap for DI IOC, it works perfect, but i dont hawe a clue how to write unit testing with StructureMap should i do this in AssemblyInitialize start Configuration of structuremap like in global.asax exept to for datacontext not to use Live LinqToSqlDataContext but some memory data like this: [Assem...

junit test method for getters & setters

I am having many java beans in my project. I need to generate a JUnit Test class for them. The test methods generated using eclipse IDE 3.2 & junit 4.4 for the beans are like... public void testGetName() { // fail("Not yet implemented"); } @Test public void testSetName() { // fail("Not yet implemented"); ...

Using WPF components in NUnit tests - how to use STA?

I need to use some WPF components in an NUnit unit test. I run the test through ReSharper, and it fails with the following error when using the WPF object: System.InvalidOperationException: The calling thread must be STA, because many UI components require this. I've read about this problem, and it sounds like the thread ne...

What’s the difference between ScalaTest and Scala Specs unit test frameworks?

Both are BDD (Behavior Driven Development) capable unit test frameworks for Scala written in Scala. And Specs is built upon may also involve the ScalaTest framework. But what does Specs offer ScalaTest doesn't? What are the differences? ...

How does TDD compare with Functional Programming Languages?

How does TDD compare with Functional Programming Languages like F# and Erlang? I haven't actually worked directly with a functional programming language yet, but from what I've seen of it, you have two sides of an equation and they have to balance like in algebra or accounting; this seems somewhat reminiscent of TDD where you define you...

How to create unit tests which runs only when manually specified?

I remember something like 'explicit', and google says that nunit has such attribute. Does Microsoft.VisualStudio.TestTools.UnitTesting provide something like this? ...

Restlet JUnit test that POSTs multipart form?

I'm working with Restlet 1.1.8 and am trying to write a Resource that parses a multipart form; it needs to allow upload of an Excel spreadsheet. I have the Resource working, when I run it from my web app it's doing The Right Things(tm) so far, but I want to write an acceptance test that POSTs via Java code so I can throw lots of test ca...

Visual studio 2008 wont debug unit tests anymore. It used to work fine.

Hi All, I have a project that uses Visual Studio test suite. One day I opened another instance of Visual Studio with a project that was using NUnit. I looked at and ran a few of the Unit Tests in that project and now my Visual Studio Unit tests are no longer working. Everything just passes. I cannot hit a break point or anything. Someth...