sethladd/dart-polymer-dart-examples — pull request #38 by szgabsz91 (2013-12-02 17:17:21+00:00)
Title: Unit test for the click counter component

I created this pull request for Issue #12.

Sorry for the many commits, but I was a bit reckless with my previous pull request. Right now I think the two requests are OK and completely independent, but if any merge conflicts will be introduced just let me know and I'll try to fix them.

This request contains my own solution for testing Polymer.dart components that I developed with the help of several blog posts so there might be things that should be done in a different way.

The changes include:

* I replaced `count += 1` to `count++`
* I added the unittest library as a dependency
* I created the test runner HTML page, a main dart test file and a dart file that tests the component itself. This way we can create tests for different components and call their `main` functions in the main test_runner.dart file.
* I also moved the click counter component to the lib folder so that importing and linking feels more natural to me than referencing files in the web folder with relative paths like `../web/click_counter...`
* I updated the web/click_counter/index.html file to reference the component's HTML file in the new lib folder.

One thing that I couldn't decide is where to put the `NullTreeSanitizer` class and I don't know if this is needed or is there a similar class in Polymer.dart somewhere.

I'm looking forward to your review, Seth, and let me know if something needs to be changed!