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

1
vote
1answer
46 views

unit-testing / mocking a class which contains functionality which depends on itself

Take the below code: public interface ISettingsManager { SettingData GetSettingByIdentifierOrCreateIfDoesNotExist(Enum identifier); T GetSetting<T>(Enum identifier); } [IocComponent] ...
1
vote
2answers
100 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: java fileName HORIZON_BOX, HORIZON_BOX_WITH_CC, HORIZON_BOX_WITH_CC 1 ...
5
votes
3answers
192 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
100 views

Test Driving Interface Design

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 ...