Il giorno 21/lug/04, alle 13:37, Leo Sutic ha scritto:

1. "Butterfly is an experiment aiming to implement a (simplified)
Cocoon clone but based on Spring instead of Hibernate" Don't you mean:
"based on Spring instead of Avalon"

Of course. Typo corrected.

2. "Strive for 100% unit test coverage" A bit of a red herring. You
don't want code coverage as much as state coverage. For example:

    /** Divides two numbers. If b == 0, returns 0. */
    public static void divide (int a, int b) { return a/b; }

Test:

    public void testDivide () { assert divide (4, 2) == 2 };

Which doesn't test the case where b == 0.

Agreed, but even if we cannot prove that code is correct with unit tests alone, we can at least hope that - statistically - code that has 100% test coverage will have less bugs than code that has 10% test coverage. Unfortunately, my impression is that Cocoon is now at the lower end of the spectrum.

        Ugo


-- Ugo Cei - http://beblogging.com/

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to