Test Driven Development involves writing a failing automated test to specify what is to be built. The test is then made to pass by writing code which satisfies the tested condition. Finally, the code is refactored.

learn more… | top users | synonyms

3
votes
2answers
67 views

Read Lines From IIS Log

The purpose of this class is to read an IIS log (or multiple ones). One thing to note is that the columns can differ based on settings in IIS. So a couple of concerns that I have: Is The ILogReader ...
13
votes
3answers
680 views

Interview Review - SOLID Principle and TDD

I had a small technical C# task using SOILD principle and TDD. But I failed to prove my coding skill through the test. Can anyone offer any small advice for me? I am really eager to learn what my ...
6
votes
2answers
137 views

Am I implementing BDD correctly?

I'm writing a utility that validates fields on a web site. I decided I'd give Behaviour Driven Development (BDD) a try. The validator utilises rules to determine if a value the user provided is valid. ...
2
votes
4answers
108 views

How to (really) unit test an adapter?

My question is really simple: shall an adapter (design pattern) class be unit tested, and how? Example: I want to create a class ClientSocket with PHP, which is ...
4
votes
1answer
100 views

Simple Java class to represent progress

Progress class was written using TDD. Interface of this class (pseudo-code): ...
2
votes
1answer
53 views

Using RSpec subject to setup a test

I find myself using subject blocks in my tests to setup example because it is succinct. However is this considered bad form and can it have undesired consequences? ...
0
votes
1answer
258 views

How to write simple code using TDD

Me and my colleagues do a small TDD-Kata practice everyday for 30 minutes. For reference this is the link for the excercise http://osherove.com/tdd-kata-1/ The objective is to write better code ...
2
votes
1answer
51 views

A C# class to check if one JSON tree (de-serialised as ExpandoObject / Array etc) contains another

I wrote this partly as a learning exercise in TDD. Could I please have feedback on both how to improve the quality of the code and the completeness of the tests? I used LinqPad as my IDE for this, ...
2
votes
1answer
87 views

General thoughts on the style of this rspec-rails test

Here's a test from a Rails app I'm working on. I want to know if I'm using describe, let, ...
1
vote
1answer
91 views
1
vote
2answers
122 views

TDD Approach and Simple Solution

How many tests could you write for the enum class below. I am looking for the following output given the following command: ...
5
votes
3answers
481 views

Maximum Sub-array Problem

I started taking a look at a programming challenge I had read about earlier today on 8thlight. Unfortunately, it seems to have been taken down and all I could remember about it was the problem posed: ...
3
votes
3answers
118 views

Test Driving Interface Design [closed]

I have been doing TDD since I have started my first job out of university (about 5 months ago), most of which is working with legacy code. I started a personal project today and thought I would TDD ...