I am on a team where i am trying to convince my teammates to adopt TDD (as i have seen it work in my previous team and the setup is similar). Also, my personal belief is that, at least in the beginning, it really helps if both TDD and Pair Programming are done in conjunction. That way, two inexperienced (in TDD) developers can help each ...
Presume you have a class which passes all its current unit tests.
If you were to add or pull out some methods/introduce a new class and then use composition to incorporate the same functionality would the new class require testing?
I'm torn between whether or not you should so any advice would be great.
Edit:
Suppose I should have ad...
I'm just getting started on a new MVC project, and like a good boy I am trying to defer going to the DB for as long as possible. Here's the scoop:
I'm planning on using the ComponentModel.DataAnnotations decorations.
I'm also planning on using LinqToSql
Is is possible to write a unit test against the DataAnnotations metadata classes?...
What I mean by this, is that sometimes architects look to simplify and improve testability, at the expense of other important forces.
For example, I'm reviewing a very complicated application, made so by extensive use of design patterns that overly favor testing, e.g. IoC, DI, AOP, etc...
Now, typically I like these things, but this ...
I'm trying to figure out how to test-drive software that launches external processes that take file paths as an input and write output after lengthy processing to stdout or some file? Is there some common patterns on writing tests in this kind of situations? It is hard to create fast executing tests that could verify correct usage of ext...
I've been reading Chapter 11 (Testable Design Patterns) in the Professional ASP.NET MVC 1.0 book. In the examples in this chapter, data access is split into a number of repositories: IOrderRepository, IProductRepository, etc. That all makes sense: a single repository for a single class of data.
However, this breaks down somewhat for me...
Let me first come out of closet. I'm a TDD believer. I'm trying to practice Test Driven Development as much as I can.
Some developers at my work refuse to even try it. I myself started TDD by trying to prove to one of my peers that Test Driven Development is a bad idea. The arguments are:
Why? I was pretty successful developer so ...
I've been reading a lot about Unit tests and Test Driven developemnt.
Recently, I also read java unit test code.
I however, prefer to develop in Qt. So I googled up "unit testing in c++" and found a host of information about various unit testing frameworks available for C++.
However, I could not find a reliable comparison of the the v...
I'm the only developer in my (very small) company and I'm about to start on a medium sized ASP.NET web application for said company.
I'm trying to figure out if I should learn Test Driven Development (TDD) and implement it in this application.
I need to start developing our new application shortly and I'm worried about testing. I've ...
I'm trying to test an Order entity method called AddItem and I'm trying to make sure that duplicate items cannot be added. Here is some example code:
[Test]
public void ItemCannotBeAddedTwiceToOrder()
{
Order o = new Order();
Item i = new Item("Bike");
o.AddItem(i);
o.AddItem(i);
Assert.AreEqual(o.ItemCount, 1, "A...
I have an extension method with the following signature (in BuildServerExtensions class)::
public static IEnumerable<BuildAgent> GetEnabledBuildAgents(this IBuildServer buildServer, string teamProjectName)
{
// Omitted agrument validation and irrelevant code
var buildAgentSpec = buildServer.CreateBuildAgentSpec(teamProjectName);...
Possible Duplicate:
How to encourage implementation of TDD?
My boss knows about TDD but won’t allow us to use it because he thinks that it is just a passing hype that everyone talks about but no serious.
How could I convince him to follow TDD?
...
Hi there,
Can anyone help, i have been succesfully testing with the built in tdd that ships with vs 2008. But now i wish to test my wcf... I added a default.aspx in the wcf service (you need to do this according the ms) ... now when i put a break point in my test.. and click the icon debug test in current context, all goes well ..,the t...
Recently i heard a dicussion in which TDD was the hot buzz word. Now acc to one speaker that to test your behaviors you need to use MVC but on the other side its been said that TDD is an approach which can be adopted in any environment (as the discussion sorround between ASP.NET MVC or Webforms). The other guy claimed if you put your beh...
Possible Duplicate:
What would you like to see in a TDD demo?
What is a good sample class to demonstrate TDD?
I'd like to prepare a one-hour talk on test-driven development, using Python. But rather than describing what TDD is (and giving little examples), I'd like to choose some user stories that could be implemented usin...
I just looked back through the project that nearly finished recently and found a very serious problem. I spent most of bank time on testing the code, reproducing the different situations "may" cause code errors.
Do you have any idea or experience to share on how to reduce the time spent on testing, so that makes the development much mor...
How do I send a cookie in a functional test? How do I test to be sure that the cookie is cleared?
I've had great success using TDD to build the models for a Rails application, but have hit a snag with regard to controller testing: I can set cookie values once in a test and read them, but I can't clear them. That is:
test "clears cookie...
EDIT: Guys, sure I meant Entity Framework not ASP.NET MVC, it was a typo most probably!
Yesterday I came a cross this article that lists some of the bad stuff with Entity Framework. And after doing some google stuff I found this one which basically is the defender here. These two posts discussed some major issues of entity framework suc...
Hello,
So I've done unit testing some, and have experience writing tests, but I have not fully embraced TDD as a design tool.
My current project is to re-work an existing system that generates serial numbers as part of the companies assembly process. I have an understanding of the current process and workflow due to looking at the exi...
How can I test the following method?
It is a method on a concrete class implementation of an interface.
I have wrapped the Process class with an interface that only exposes the methods and properties I need. The ProcessWrapper class is the concrete implementation of this interface.
public void Initiate(IEnumerable<Cow> cows)
{...