Hi Guys,
Yea i know i'm way behind times but what i've got here is a antique VB6 editor app which i believe that no one will be upgrading to .NET soon. It uses a couple of third party DLLs tools and as it's still using the good old RichEdit control i basically can raise my own Bug farm with just this tool alone.
So enough is enough and...
How do I go about testing a function or module that is machine or platform dependent? For example, something that looks at/depends on $^O or a module like Net::Ifconfig::Wrapper? I don't need to test that Net::Ifconfig::Wrapper is returning the correct values, but I do need to test whether or not I'm doing the right thing with those va...
Is it possible to use the syntax
using(_mocks.Record())
{
//...
}
using(_mocks.Playback())
{
//...
}
with StructureMap RhinoAutoMocker?
In Jeremy Millers original post AutoMocker in StructureMap 2.5 this seems possible since RhinoAutoMocker inherits MockRepository, but in version 2.5.2 of StructureMap this seems to be implemen...
Hello,
I have a quick little application and wanted to give a try to develop using TDD. I've never used TDD and actually didn't even know what it was until I found ASP.NET-MVC. (My first MVC app had unit tests, but they were brittle, way coupled, took too much up keep, and were abandoned -- I've come to learn unit tests != TDD).
Back...
What are some situations where unit testing and TDD and the like are more trouble than they're worth?
Some things I've come up with are:
When generating test data is tricky: Sometimes, being able to come up with valid, non trivial test data is a challenge in itself.
When the only practical way of verifying correctness of the code is t...
I am a hacker not and not a full-time programmer but am looking to start my own full application development experiment. I apologize if I am missing something easy here. I am looking for recommendations for books, articles, sites, etc for learning more about test driven development specifically compatible with or aimed at Python web appl...
Disclosure: I am a Rhino Mocks n00b!
OK, I know there has been a lot of confusion over the new AAA syntax in Rhino Mocks, but I have to be honest, from what I have seen so far, I like. It reads better, and saves on some keystrokes.
However, I am having problems getting my head around this, and seek some advice to make sure I am not mis...
Hello,
I'm trying to learn TDD by applying it to a simple project of mine. Some details (and an earlier question) are here:
http://stackoverflow.com/questions/473679/tdd-help-with-writing-testable-class
The specifics are I have a PurchaseOrderCollection class that has a private List of PurchaseOrders (passed in at constructor), and t...
You may think this question is like this question asked on StackOverflow earlier. But I am trying to look at things differently.
In TDD we write tests that include different conditions, criteria, verification code. If a class passes all these tests we are good to go. It is a way of making sure that the class actually does what its suppo...
I have some test code that looks like this:
[Test]
public void RunTableInfoCommandShouldCallTableINfoWithName()
{
string expectedcommand = "TableInfo(TestTable,1)";
Table.RunTableInfoCommand(mockmapinfo.Object,
"TestTable",
TableInfoEnum.TAB_INFO_NAME); //This is just an en...
Which one offers more advantages for a large software, say like Photoshop?
Also by TDD I don't mean just unit tests, because you can use unit tests in DDD too, just not the same way TDD does.
DDD: Design-Driven Development
TDD: Test-Driven Development
...
I'm new to TDD, and I find RegExp quite a particular case. Is there any special way to unit test them, or may I just threat them as regular functions?
...
We had a debate - cons and pros of having a factory per dto in order to test some service.
The idea is that the service is being invoked with primitive types parameters (username, password, etc), but the service dependency should be leveraged using those primitives. The only way to test it was to inject into service an additional depende...
I'm building a blog engine to test some concepts such us TDD and using inversion of control... I came up with a setup where I'd have a generic IBlogRepository interface so I could support both SQL and XML.
public interface IBlogRepository : IRepository
{
Post GetPostById(Guid postId);
Post GetPostByFriendlyUrl(string friendlyUrl);
L...
I have always inserted my Linq2SQL queries all over the place, in almost every class all over the place.
I woud like to know what your strategy about where to put your Linq2SQL queries?
Do you put them in separate datalayer classes or do you store them where they are used all over the place?
I think that I need to chang my strategy f...
OK, having tried my first TDD attempt, it's time to reflect a little
and get some guidance, because it wasn't that successful for me.
The solution was partly being made with an existing framework, perhaps
making TDD less ideal. The part that seemed to give me the biggest
problem, was the interaction between the view and controller. I'll
...
I'm still learning the dark arts of TDD and recently I've been trying to learn how to do TDD in VB6 and what I basically narrow down the list to was the free simplyvbunit and the most costly vbunit3.
My application is an richtext editor with plenty of 3rd party dll and I was scouring high and low in Google to find how to do unit test t...
We have a group of a few developers and some business analysts. We as developers would like to start adding unit testing as part of our coding practices so that we can deliver maintainable and extensible code, especially since we will also be the ones supporting and enhancing the application in the future. But in this economic downturn w...
Personally, I've always put unit tests in a separate project just because that's how MSTest seems to be set up. But I'm reading Refactoring: Improving the Design of Existing Code by Martin Fowler and he seems to be advocating not only putting them in the same project, but also putting them in the same class as the method they're testing...
I'm reading about Rails fixtures in this guide (thanks, trevorturk). It appears you define classes in a Yaml file and they're automatically loaded into the test DB -- cool.
But if you want to specify that this recipe belongs to that cookbook (or whatever) how do you do that?
Are you supposed to specify the values for cookbook.id and re...