Questions tagged [testdrivendesign]
19 questions
28
votes
8 answers
Unit Testing or Functional Testing?
I have recently heard of Functional Testing over Unit Testing.
I understand that Unit Testing tests each of the possibilities of a given piece of code from its most atomic form. But what about Functional Testing?
This sounds to me like only testing…

Will Marcouiller
- 23,773
- 22
- 96
- 162
23
votes
7 answers
TDD - beginner problems and stumbling blocks
While I've written unit tests for most of the code I've done, I only recently got my hands on a copy of TDD by example by Kent Beck. I have always regretted certain design decisions I made since they prevented the application from being 'testable'.…

Noufal Ibrahim
- 71,383
- 13
- 135
- 169
8
votes
8 answers
The Purpose of Mocking
What is the purpose of mocking?
I have been following some ASP.NET MVC tutorials that use NUnit for testing and Moq for mocking. I am a little unclear about the mocking part of it though.

Ronnie Overby
- 45,287
- 73
- 267
- 346
4
votes
4 answers
Creating a Mapping Function Through TDD: Too Much Time Spent Writing Tests?
I'm a big TDD enthusiast, and always strive to write tests before writing production code to ensure correct behavior of the code that I'm writing. Occasionally, however, several question if it is prudent to write a large body of tests for certain…

Doctor Blue
- 3,769
- 6
- 40
- 63
2
votes
2 answers
TDD and MVC Crossroads. What ORM integrates nicely?
I'm just starting out in MVC world, and I've used a standard MVC template that's built into VS 2010. I've got a couple of controllers and views hooked up, and now I need to get to my database.
I've got an existing SQL Server 2005 database that is…

Matt Dawdy
- 19,247
- 18
- 66
- 91
2
votes
5 answers
How can I still use DDD, TDD in BizTalk?
I just started getting into BizTalk at work and would love to keep using everything I've learned about DDD, TDD, etc. Is this even possible or am I always going to have to use the Visio like editors when creating things like pipelines and…

rmontgomery429
- 14,660
- 17
- 61
- 66
2
votes
1 answer
Unit test contains instances of other classes not only mocks
I am starting new project from scratch and I would like to have high unit tests coverage.
Let's say that we have ClassA, ClassB and ClassC and ClassATest, ClassBTest, ClassCTest.
Is it a good practice to use in a ClassATest real object of a ClassB…

BlueLettuce16
- 2,013
- 4
- 20
- 31
2
votes
1 answer
TDD multi threaded applications
Could someone shed some light on how multi threaded functionality could be developed in a pure TDD fashion. (possibly with some examples in C# or Java)
Thanks in Advance.

Eranga Dissanayaka
- 1,930
- 3
- 24
- 27
1
vote
1 answer
Why extract an interface when we can DI a delegate to make it testable?
I was browsing SO and came across this comment on an answer:
Why do we go through the ceremony of extracting an interface when we
can DI a delegate to make it testable?
This articulated a thought I had earlier in the year. Is there anything…

Ben Aston
- 53,718
- 65
- 205
- 331
1
vote
1 answer
Using Test-Driven in DDD (Domain layer)
How to start with TDD in Domain layer, and what I mean by this is how to test Domain Models?
What is it that should be tested? the Aggregates or each Entity ?
What are some good practices and strategies for testing the onion architecture Domain…
user9124444
1
vote
2 answers
Some confusion about test driven development
According to wikipedia following are the steps in TDD:
step 1: Write a unit test
step 2: run the unit test
step 3: write code for module
step 4: run ALL tests again
step 5: clean up code
step 6: repeat the steps
Question 1 : in TDD we mainly write…

a Learner
- 4,944
- 10
- 53
- 89
1
vote
1 answer
Leads CA1822 to a bad design for modern development when it comes to unit testing?
We use Code Analysis within a build server with the firm restriction that we cannot commit code if a Code Analysis rule breaks. CA1822 is enabled and therefore we have many, many static functions. Now we want to force unit tests with mocking and…

Jeremy Benks
- 21
- 3
1
vote
2 answers
How can I test exceptions using Test Driven Design concept in eclipse
I'm writing a Stack class using the Test Driven Design concept.
In the setUp() method my stack is created with 0 elements like this
Stack stack = new Stack();
This is my attempted test to catch the StackEmptyException which would be raised when…

Danny Rancher
- 1,923
- 3
- 24
- 43
1
vote
1 answer
TDD CRUD based scenario
I've got a simple CRUD based application to be done. I'm trying to approach this in a TDD way. I'm a newbie to TDD and cannot actually understand how to proceed with my tests.
The scenario is:
I need to be able to create/update/delete Employees…

Eranga Dissanayaka
- 1,930
- 3
- 24
- 27
0
votes
1 answer
Repository pattern for database that allows CRUD operations through Interops
The situation we are facing currently is Model Entities and database logic are tightly interweaved together which is making unit tests impossible. So, I decided to go with designing a Repository pattern. The basic structure of storage model what we…

VyshuRam
- 93
- 1
- 10