Skip to content

Instantly share code, notes, and snippets.

@sk8terboi87
Created June 16, 2014 14:39
Show Gist options
  • Save sk8terboi87/55e2767fb7af1f80f780 to your computer and use it in GitHub Desktop.
Save sk8terboi87/55e2767fb7af1f80f780 to your computer and use it in GitHub Desktop.
http://haacked.com/archive/2009/07/14/law-of-demeter-dot-counting.aspx/
http://devblog.avdi.org/2011/07/05/demeter-its-not-just-a-good-idea-its-the-law/
> http://www.slideshare.net/jeresig/understanding-javascript-testing
>
>> http://www.slideshare.net/DragonBe/unit-testing-php-apps-with-php-unit
>> http://www.slideshare.net/nickokiss/unit-testing-best-practices
>> http://www.slideshare.net/RobertoCasadei/effective-unit-testing
@sk8terboi87
Copy link
Author

Story

1. I need an emergency light which turns on automatically as power goes off.
2. I need an emergency light which turns off automatically as power is restored.
3. The emergency light must be able to power a 40W bulb for 3 hours.

Components

- Light (40W)
- Battery (???)
- Mains power detector

Unit Testcases

## Light
    - With 40W input the bulb must work
    - With 50W inut the bulb must fail
## Battery
    - With a 40W load on the battery, it must power for 3 hours
    - With a 120W load on the battery, it must power for 1 hour
## Mains Power Detector
    - With primary (120v) and secondary power (40v) provided, the output must be 120v
    - With no primary and secondary power (40v) provided, the output must be 40v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment