Skip to main content

Questions tagged [tdd]

TDD stands for Test-Driven Development, or Test-Driven Design. It is the practice of writing a unit test before writing code to satisfy it, in what is known as the Red-Green-Refactor cycle.

1 vote
1 answer
117 views

I’m working on a three layers architecture backend (Laravel). Here’s the context: I have a PasswordService responsible for updating a user’s password. and a Otpservice responsible for verifying/...
aymen's user avatar
  • 23
4 votes
4 answers
249 views

I am designing an analytics application using domain driven design and test driven development. I am having difficulty modeling the following requirement: The application shows a workitem's state. ...
Afelium's user avatar
  • 51
3 votes
2 answers
235 views

Say I have a method that expects data to be in some form to perform accurately. In the actual service/application flow, that data is formed upstream in other methods or services. How can I ensure the ...
Jason's user avatar
  • 33
2 votes
3 answers
462 views

This question is a more specific version of the one I posted last week. Let's say I have a complex data structure that is posted into a bunch of different services. The interface of all services looks ...
David Mason's user avatar
1 vote
4 answers
234 views

Lets say I have an API with two functions: CreateNewMachine(CreateMachineCommand createMachine); EditExistingMachine(EditMachineCommand editMachine); The internal logic of both functions should be ...
David Mason's user avatar
3 votes
7 answers
624 views

I am currently reading the (not yet completed) ebook "Test Driven Developlment - Extensive Tutorial" by Grzegorz Gałęzowski. There is a chapter featuring Mark Seeman's idea of constrained ...
Döharrrck's user avatar
1 vote
1 answer
179 views

What are the use cases of TestOf? I'm new to NUnit testing and from what I have seen, most people don't use this attribute that much. From my experience, TestOf helped me to quickly identify what ...
LNTR's user avatar
  • 43
2 votes
5 answers
500 views

I was exploring TDD, specifically the Outside-In TDD pattern, where we need to write the acceptance (integration) test and then jump on to granular unit tests to implement the feature and make the ...
Jignesh M. Khatri's user avatar
0 votes
4 answers
338 views

Let's say that I've been iterating over my feature A with TDD. After several red-green-refactor cycles, I ended up with a nicely polished implementation with a part of the SUT encapsulated into some ...
Maciek Czarnik's user avatar
2 votes
3 answers
472 views

I admire Bob Martin's Clean Code. Lately, however, I realized an apparent contradiction. One of the three rules of TDD, which Bob Martin advocates for in his book, is to never write more code that is ...
Sergey Zolotarev's user avatar
0 votes
2 answers
2k views

I'm doing some TDD practice for my own learning. I'm trying to figure out how to transparently set up private properties of an object to support testing. I have a binary tree node: internal class Node ...
mike1952's user avatar
  • 109
3 votes
3 answers
1k views

Suppose I had some Manager class that I need to change in regards to existing functionality by removing code. The Manager always sends an initial message after a connection was established to do an ...
Late347's user avatar
  • 55
38 votes
12 answers
8k views

We all know the standard TDD cycle: I first write a unit test, the smallest unit test that fails; then I write some production code, again the smallest amount of production code that is sufficient to ...
gaazkam's user avatar
  • 4,529
0 votes
3 answers
473 views

We have a piece of code that decorates an interface to transparently add retry logic. Inversion of Control configuration service.AddOurRestApiClient() .AddResilienceHandler("Retry", ...
LostInComputer's user avatar
11 votes
4 answers
3k views

I'm trying to practice BDD by applying it to a simple problem—in this case, the flocking algorithm, better known as "boids". Before any of the rules (cohesion, alignment, etc.) comes the ...
verified_tinker's user avatar

15 30 50 per page
1
2 3 4 5
46