▸ Who does unit testing? ▸ What is unit testing? ▸ When should I use unit testing? ▸ Why do developers use unit testing? ▸ How do I get started with unit testing? 2
in 1995 ▸ Borland Turbo Pascal ▸ 12 Year Gap ▸ Music School, Teaching Career ▸ Music Visualizations (2007) ▸ Self Study + Coding Bootcamp (2014) 5 Contact: [email protected]
WE HAVE SMALL BARS (1 KILO EACH) AND BIG BARS (5 KILOS EACH). RETURN THE NUMBER OF SMALL BARS TO USE, ASSUMING WE ALWAYS USE BIG BARS BEFORE SMALL BARS. RETURN -1 IF IT CAN'T BE DONE. Nick Parlante, CodingBat.com A FAVORITE ALGORITHM CHALLENGE 12
TO UNIT TESTING ▸ Tests that are only concerned with input and output of a function ▸ Focus narrowly before worrying about ▸ Dependency injection ▸ Global state ▸ Asynchronous behavior ▸ Mocks ▸ Browser automation 16
▸ We want make a package of goal kilos of chocolate. ▸ We have small bars (1 kilo each) ▸ and big bars (5 kilos each) ▸ Return the number of small bars to use, assuming we always use big bars before small bars ▸ Return -1 if it can't be done. 17