You are on page 1of 1

The following questions need to be considered when writing the test:

- Precondition:
- Preconditia:
+ What is the state of the system before we invoke the method?
+ Care este starea sistemului inainte de a invoca metoda?
- Invocation:
- Invocarea:
+ How should the signature of the method look?
+ Cum arata semnatura metodei?
+ What are the input parameters (if any) of the method?
+ Care sunt parametrii functiei (daca sunt)?
- Assertion:
- Presupunerea:
+ What is the expected result of the method invocation?
+ Care este rezultatul asteptat in urma invocarii metodei


We started with a failing test. We made the test pass. And, finally, we refactored
the code to be clean. The steps you have seen here seem so simple and stupid
that you may think that you could skip some of the tests and still be good. But
then, it's not TDD anymore. The beauty of TDD is that the steps are so easy that
you do not have to think about them. You just have to remember what the next
step is.

Am inceput cu un test care nu trecea. L-am facut sa treaca. L-am refactorizat

pentru a fi mai curat. Pasii de mai sus par stupizi si simpli, probabil in
momentul de fata crezi ca ai putea sa sari peste ei si tot sa fii bun. Dar, atunci
nu ar mai fi TDD. Frumusetea TDD-ului este ca pasii sunt atat de simpli incat
nu trebuie sa te gandesti la ei, ci doar sa retii care este urmatorul pas.