Using test driven development (TDD) write a prime factor generator method and at least 7 unit tests to go along with it. You are more than welcome to write more unit tests if you prefer.
###Task Write a method that will take an integer parameter and return a collection of integers. The method should return the prime factors for the input parameter. You can write the answer in whatever language you prefer so the collection of integers can be whatever is used to represent a list of integers in the language you choose to use to solve the problem. For bonus points see how few lines of code you can write it in and still have a valid solution without using any framework or built-in methods besides basic math methods (i.e. add, subtract, multiply, divide, and modulus).
###Input Create at least 7 unit tests with these test input parameters:
- 1
- 2
- 3
- 4
- 6
- 8
- 9
###Output The answers to the above inputs are listed below in the same order:
- emtpy list
- 2
- 3
- 2, 2
- 2, 3
- 2, 2, 2
- 3, 3
###Reference Thanks to uncle bob's website for this Code Kata. He has some great katas on his website and I'm sure we'll use some more of them as we continue to code kata.
- Fork this github repository.
- Write your solution to the problem.
- Commit your solution to the repository.
- Post a link to your fork as a comment to this Prime Factors post on codekata.co.