creadur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Suárez Sánchez <ssm...@gmail.com>
Subject Re: [GSOC] DefaultAnalyser
Date Wed, 10 Jul 2013 18:30:08 GMT
Thanks for your advice Robert.

http://dannorth.net/**introducing-bdd/
>  <http://dannorth.net/introducing-bdd/>http://martinfowler.com/**
> articles/mocksArentStubs.html
> <http://martinfowler.com/articles/mocksArentStubs.html>
> http://www.refactoring.com/**catalog/index.html<http://www.refactoring.com/catalog/index.html>


I saved this webPage in my bookmarks.

Now I´m more interesting: Introducing-BDD because The names of the test of
apache-rat-core aren´t good names.(for example I only see that name of the
method is testing but what things are testing).

Manuel.


2013/7/8 Robert Burrell Donkin <robertburrelldonkin@blueyonder.co.uk>

> DefaultAnalyserFactory is a good example of why static methods introduce
> unnecessary coupling and make systems hard to test:
>
> https://gist.github.com/**RobertBurrellDonkin/5952112<https://gist.github.com/RobertBurrellDonkin/5952112>
>
> Both guessers have (immutable) state, which could have been injected
> through constructors. Then instances could have been injected into
> DefaultAnalyser. By factoring out an interface for guessers, would have
> allowed the interface (rather than the implementation) to be injected. Then
> DefaultAnalyser could have been tested using mocking and stubbing
> techniques as well as being easier to understand and extend.
>
> This might be a good opportunity to try out some BDD as well as other
> refactoring techniques. Potentially challenging (especially as it's more
> difficult for me to explain than to do) but sometimes that's a good way to
> learn ;-)
>
> See, for example,
>
> http://dannorth.net/**introducing-bdd/<http://dannorth.net/introducing-bdd/>
> http://martinfowler.com/**articles/mocksArentStubs.html<http://martinfowler.com/articles/mocksArentStubs.html>
> http://www.refactoring.com/**catalog/index.html<http://www.refactoring.com/catalog/index.html>
>
> Hopefully people will jump in with other ideas, help and suggestions
>
> Robert
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message