Last presentation: TDD from end to end

Yesterday I presented “TDD from end to end” at Codemotion in Rome. My talk was about how to use TDD to drive the development of the whole system, from the GUI to the database. The slides contain a small solved exercise, which could be a good kata for Java servlet and JDBC skills. The techniques I showed are not my own! I’m showing things I learned from Francesco Cirillo and Carlo Bottiglieri.

The slides are in Italian, but they mostly contain Java code with English identifiers: 20110305-tdd-codemotion.pdf. Enjoy!

Update: here is the video.

3 Responses to “Last presentation: TDD from end to end”

  1. Annalisa Says:

    Sabato ho seguito il talk al Codemotion, mi è piaciuto molto. Grazie mille

  2. matteo Says:

    Grazie Annalisa!

  3. Roberto Simoni Says:

    Molto interessante!
    ti volevo chiedere un ulteriore step… se la prossima user story fosse “un post puo’ esser eliminato” preferiresti scrivere un test così:

    @Test public void deleteRemovesBlogPost() {
    final BlogPost aBlog = new BlogPost();
    final List allPosts = new ArrayList(asList(aBlog));
    BlogRepository repository = new BlogRepository() {
    public List all() {
    return allPosts;
    }

    public void delete(BlogPost post) {
    allPost.remove(post);
    }
    };

    repository.delete(aBlog);
    assertEquals(0, repository.size());
    }

    oppure vorresti poter dire:

    @Test public void deleteRemovesBlogPost() {
    … // ?!? no idea for now…

    aBlog.delete();
    assertEquals(0, repository.size());
    }

    oppure faresti totalmente in un altro modo?

    Cioè sintetizzando: assegneresti l’operazione di cancellazione al repository o al post?

Leave a Reply