05avr. 2016

CleanCoder : Giving up on TDD

Ou pourquoi certains dév abandonnent TDD par Uncle Bob Martin.

Ce post est une mine d'arguments pour expliquer et convaincre vos collègues de l'utilité de la méthode Test Driven Development.

Morceaux choisis

Design et TDD

- But I thought TDD meant that you didn't have to design.

Yeah, and: "Love means you never have to say your sorry." What a bunch of horse hockey! We are programmers! We design! We create structures with high cohesion and low coupling. We manage dependencies. We isolate modules. WE. DESIGN.

Les tests nous parlent

Something that is hard to test is badly designed.

- Hmmm. I'm not sure...

Look. Suppose you ask me to write an app to control your grandmother's pacemaker. I agree, and a week later I hand you a thumb-drive and tell you to load it into her controller. Before you do you ask me: "Did you test it?" And my response is: "No, I chose a design that was hard to test."

10sept. 2015

Unity : tester l'instanciation des classes

Cela fait plusieurs fois que je rencontre le problème des enregistrements manquants dans Unity. Le projet se lance et on obtient l'erreur suivante :

Resolution of the dependency failed, 
    type = "MyAssembly.IMyTypeName", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current 
    type, MyAssembly.IMyTypeName, is an interface 
    and cannot be constructed. Are you missing 
    a type mapping?

Les applications en entreprise nécessitent souvent que des webservices soient lancés, des cas de tests créés etc ... .

Mettre toutes ces conditions en place prends du temps - pour parfois aboutir à ce message d'erreur, et être obligé de tout recommencer.

Heureusement il est possible d'automatiser.

Lire la suite...