trackler 2.0.8.14 → 2.0.8.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (409) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/robot-simulator/canonical-data.json +238 -214
  3. data/common/exercises/secret-handshake/canonical-data.json +80 -64
  4. data/lib/trackler/version.rb +1 -1
  5. data/tracks/csharp/.gitignore +6 -1
  6. data/tracks/csharp/.travis.yml +26 -3
  7. data/tracks/csharp/Zipper.cs +137 -0
  8. data/tracks/csharp/appveyor.yml +6 -1
  9. data/tracks/csharp/build.fsx +59 -47
  10. data/tracks/csharp/circle.yml +15 -5
  11. data/tracks/csharp/docs/INSTALLATION.md +12 -177
  12. data/tracks/csharp/docs/TESTS.md +21 -38
  13. data/tracks/csharp/exercises/accumulate/Accumulate.cs +10 -0
  14. data/tracks/csharp/exercises/accumulate/Accumulate.csproj +18 -0
  15. data/tracks/csharp/exercises/accumulate/AccumulateTest.cs +16 -27
  16. data/tracks/csharp/exercises/acronym/Acronym.cs +9 -0
  17. data/tracks/csharp/exercises/acronym/Acronym.csproj +18 -0
  18. data/tracks/csharp/exercises/acronym/AcronymTest.cs +17 -20
  19. data/tracks/csharp/exercises/acronym/Example.cs +11 -14
  20. data/tracks/csharp/exercises/all-your-base/AllYourBase.cs +9 -0
  21. data/tracks/csharp/exercises/all-your-base/AllYourBase.csproj +18 -0
  22. data/tracks/csharp/exercises/all-your-base/AllYourBaseTest.cs +30 -51
  23. data/tracks/csharp/exercises/allergies/Allergies.cs +19 -0
  24. data/tracks/csharp/exercises/allergies/Allergies.csproj +18 -0
  25. data/tracks/csharp/exercises/allergies/AllergiesTest.cs +28 -40
  26. data/tracks/csharp/exercises/alphametics/Alphametics.cs +10 -0
  27. data/tracks/csharp/exercises/alphametics/Alphametics.csproj +19 -0
  28. data/tracks/csharp/exercises/alphametics/AlphameticsTest.cs +18 -24
  29. data/tracks/csharp/exercises/alphametics/Example.cs +6 -1
  30. data/tracks/csharp/exercises/anagram/Anagram.cs +14 -0
  31. data/tracks/csharp/exercises/anagram/Anagram.csproj +18 -0
  32. data/tracks/csharp/exercises/anagram/AnagramTest.cs +19 -28
  33. data/tracks/csharp/exercises/atbash-cipher/AtbashCipher.cs +9 -0
  34. data/tracks/csharp/exercises/atbash-cipher/AtbashCipher.csproj +18 -0
  35. data/tracks/csharp/exercises/atbash-cipher/AtbashTest.cs +11 -11
  36. data/tracks/csharp/exercises/atbash-cipher/Example.cs +1 -1
  37. data/tracks/csharp/exercises/bank-account/BankAccount.cs +27 -0
  38. data/tracks/csharp/exercises/bank-account/BankAccount.csproj +18 -0
  39. data/tracks/csharp/exercises/bank-account/BankAccountTest.cs +14 -18
  40. data/tracks/csharp/exercises/beer-song/BeerSong.cs +14 -0
  41. data/tracks/csharp/exercises/beer-song/BeerSong.csproj +18 -0
  42. data/tracks/csharp/exercises/beer-song/BeerTest.cs +13 -11
  43. data/tracks/csharp/exercises/binary-search-tree/BinarySearchTree.cs +53 -0
  44. data/tracks/csharp/exercises/binary-search-tree/BinarySearchTree.csproj +18 -0
  45. data/tracks/csharp/exercises/binary-search-tree/BinarySearchTreeTest.cs +28 -36
  46. data/tracks/csharp/exercises/binary-search/BinarySearch.cs +9 -0
  47. data/tracks/csharp/exercises/binary-search/BinarySearch.csproj +18 -0
  48. data/tracks/csharp/exercises/binary-search/BinarySearchTest.cs +19 -28
  49. data/tracks/csharp/exercises/bob/Bob.cs +9 -0
  50. data/tracks/csharp/exercises/bob/Bob.csproj +18 -0
  51. data/tracks/csharp/exercises/bob/BobTest.cs +37 -55
  52. data/tracks/csharp/exercises/bob/Example.cs +2 -3
  53. data/tracks/csharp/exercises/book-store/BookStore.cs +10 -0
  54. data/tracks/csharp/exercises/book-store/BookStore.csproj +18 -0
  55. data/tracks/csharp/exercises/book-store/BookStoreTest.cs +25 -37
  56. data/tracks/csharp/exercises/book-store/Example.cs +1 -1
  57. data/tracks/csharp/exercises/bowling/Bowling.cs +14 -0
  58. data/tracks/csharp/exercises/bowling/Bowling.csproj +18 -0
  59. data/tracks/csharp/exercises/bowling/BowlingTest.cs +49 -72
  60. data/tracks/csharp/exercises/bracket-push/BracketPush.cs +9 -0
  61. data/tracks/csharp/exercises/bracket-push/BracketPush.csproj +18 -0
  62. data/tracks/csharp/exercises/bracket-push/BracketPushTest.cs +25 -36
  63. data/tracks/csharp/exercises/change/Change.cs +9 -0
  64. data/tracks/csharp/exercises/change/Change.csproj +18 -0
  65. data/tracks/csharp/exercises/change/ChangeTest.cs +15 -22
  66. data/tracks/csharp/exercises/circular-buffer/CircularBuffer.cs +29 -0
  67. data/tracks/csharp/exercises/circular-buffer/CircularBuffer.csproj +18 -0
  68. data/tracks/csharp/exercises/circular-buffer/CircularBufferTest.cs +36 -43
  69. data/tracks/csharp/exercises/clock/Clock.cs +24 -0
  70. data/tracks/csharp/exercises/clock/Clock.csproj +18 -0
  71. data/tracks/csharp/exercises/clock/ClockTest.cs +35 -48
  72. data/tracks/csharp/exercises/connect/Connect.cs +21 -0
  73. data/tracks/csharp/exercises/connect/Connect.csproj +18 -0
  74. data/tracks/csharp/exercises/connect/ConnectTest.cs +17 -24
  75. data/tracks/csharp/exercises/connect/Example.cs +36 -37
  76. data/tracks/csharp/exercises/crypto-square/CryptoSquare.cs +41 -0
  77. data/tracks/csharp/exercises/crypto-square/CryptoSquare.csproj +18 -0
  78. data/tracks/csharp/exercises/crypto-square/CryptoSquareTest.cs +33 -49
  79. data/tracks/csharp/exercises/custom-set/CustomSet.cs +88 -0
  80. data/tracks/csharp/exercises/custom-set/CustomSet.csproj +18 -0
  81. data/tracks/csharp/exercises/custom-set/CustomSetTest.cs +75 -111
  82. data/tracks/csharp/exercises/custom-set/Example.cs +20 -2
  83. data/tracks/csharp/exercises/diamond/Diamond.cs +9 -0
  84. data/tracks/csharp/exercises/diamond/Diamond.csproj +18 -0
  85. data/tracks/csharp/exercises/diamond/DiamondTest.cs +35 -26
  86. data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.cs +19 -0
  87. data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.csproj +18 -0
  88. data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs +21 -38
  89. data/tracks/csharp/exercises/difference-of-squares/Example.cs +5 -17
  90. data/tracks/csharp/exercises/diffie-hellman/DiffieHellman.cs +20 -0
  91. data/tracks/csharp/exercises/diffie-hellman/DiffieHellman.csproj +18 -0
  92. data/tracks/csharp/exercises/diffie-hellman/DiffieHellmanTest.cs +16 -18
  93. data/tracks/csharp/exercises/dominoes/Dominoes.cs +10 -0
  94. data/tracks/csharp/exercises/dominoes/Dominoes.csproj +18 -0
  95. data/tracks/csharp/exercises/dominoes/DominoesTest.cs +35 -46
  96. data/tracks/csharp/exercises/dot-dsl/DotDsl.cs +15 -0
  97. data/tracks/csharp/exercises/dot-dsl/DotDsl.csproj +18 -0
  98. data/tracks/csharp/exercises/dot-dsl/DotDslTest.cs +40 -30
  99. data/tracks/csharp/exercises/error-handling/ErrorHandling.cs +24 -0
  100. data/tracks/csharp/exercises/error-handling/ErrorHandling.csproj +18 -0
  101. data/tracks/csharp/exercises/error-handling/ErrorHandlingTest.cs +12 -16
  102. data/tracks/csharp/exercises/etl/ETLTest.cs +9 -13
  103. data/tracks/csharp/exercises/etl/Etl.cs +10 -0
  104. data/tracks/csharp/exercises/etl/Etl.csproj +18 -0
  105. data/tracks/csharp/exercises/etl/Example.cs +1 -1
  106. data/tracks/csharp/exercises/exercises.sln +1475 -0
  107. data/tracks/csharp/exercises/flatten-array/FlattenArray.cs +10 -0
  108. data/tracks/csharp/exercises/flatten-array/FlattenArray.csproj +18 -0
  109. data/tracks/csharp/exercises/flatten-array/FlattenArrayTest.cs +18 -22
  110. data/tracks/csharp/exercises/food-chain/FoodChain.cs +14 -0
  111. data/tracks/csharp/exercises/food-chain/FoodChain.csproj +18 -0
  112. data/tracks/csharp/exercises/food-chain/FoodChainTest.cs +11 -15
  113. data/tracks/csharp/exercises/forth/Forth.cs +27 -0
  114. data/tracks/csharp/exercises/forth/Forth.csproj +19 -0
  115. data/tracks/csharp/exercises/forth/ForthTest.cs +42 -56
  116. data/tracks/csharp/exercises/gigasecond/Example.cs +1 -1
  117. data/tracks/csharp/exercises/gigasecond/Gigasecond.cs +9 -0
  118. data/tracks/csharp/exercises/gigasecond/Gigasecond.csproj +18 -0
  119. data/tracks/csharp/exercises/gigasecond/GigasecondTest.cs +7 -10
  120. data/tracks/csharp/exercises/go-counting/Example.cs +44 -44
  121. data/tracks/csharp/exercises/go-counting/GoCounting.cs +27 -0
  122. data/tracks/csharp/exercises/go-counting/GoCounting.csproj +18 -0
  123. data/tracks/csharp/exercises/go-counting/GoCountingTest.cs +53 -41
  124. data/tracks/csharp/exercises/grade-school/Example.cs +12 -14
  125. data/tracks/csharp/exercises/grade-school/GradeSchool.cs +20 -0
  126. data/tracks/csharp/exercises/grade-school/GradeSchool.csproj +18 -0
  127. data/tracks/csharp/exercises/grade-school/GradeSchoolTest.cs +21 -41
  128. data/tracks/csharp/exercises/grains/Example.cs +1 -1
  129. data/tracks/csharp/exercises/grains/Grains.cs +14 -0
  130. data/tracks/csharp/exercises/grains/Grains.csproj +18 -0
  131. data/tracks/csharp/exercises/grains/GrainsTest.cs +17 -25
  132. data/tracks/csharp/exercises/grep/Grep.cs +9 -0
  133. data/tracks/csharp/exercises/grep/Grep.csproj +18 -0
  134. data/tracks/csharp/exercises/grep/GrepTest.cs +62 -79
  135. data/tracks/csharp/exercises/hamming/Example.cs +2 -15
  136. data/tracks/csharp/exercises/hamming/Hamming.cs +9 -0
  137. data/tracks/csharp/exercises/hamming/Hamming.csproj +18 -0
  138. data/tracks/csharp/exercises/hamming/HammingTest.cs +13 -19
  139. data/tracks/csharp/exercises/hangman/Example.cs +11 -11
  140. data/tracks/csharp/exercises/hangman/Hangman.cs +34 -0
  141. data/tracks/csharp/exercises/hangman/Hangman.csproj +18 -0
  142. data/tracks/csharp/exercises/hangman/HangmanTest.cs +37 -42
  143. data/tracks/csharp/exercises/hello-world/HelloWorld.cs +9 -0
  144. data/tracks/csharp/exercises/hello-world/HelloWorld.csproj +18 -0
  145. data/tracks/csharp/exercises/hello-world/HelloWorldTest.cs +3 -4
  146. data/tracks/csharp/exercises/house/House.cs +9 -0
  147. data/tracks/csharp/exercises/house/House.csproj +18 -0
  148. data/tracks/csharp/exercises/house/HouseTest.cs +3 -3
  149. data/tracks/csharp/exercises/isogram/Isogram.cs +9 -0
  150. data/tracks/csharp/exercises/isogram/Isogram.csproj +18 -0
  151. data/tracks/csharp/exercises/isogram/IsogramTest.cs +14 -14
  152. data/tracks/csharp/exercises/kindergarten-garden/KinderGartenGardenTest.cs +28 -33
  153. data/tracks/csharp/exercises/kindergarten-garden/KindergartenGarden.cs +27 -0
  154. data/tracks/csharp/exercises/kindergarten-garden/KindergartenGarden.csproj +18 -0
  155. data/tracks/csharp/exercises/largest-series-product/LargestSeriesProduct.cs +9 -0
  156. data/tracks/csharp/exercises/largest-series-product/LargestSeriesProduct.csproj +18 -0
  157. data/tracks/csharp/exercises/largest-series-product/LargestSeriesProductTest.cs +31 -48
  158. data/tracks/csharp/exercises/leap/Leap.cs +9 -0
  159. data/tracks/csharp/exercises/leap/Leap.csproj +18 -0
  160. data/tracks/csharp/exercises/leap/LeapTest.cs +9 -13
  161. data/tracks/csharp/exercises/ledger/Example.cs +16 -5
  162. data/tracks/csharp/exercises/ledger/Ledger.cs +4 -1
  163. data/tracks/csharp/exercises/ledger/Ledger.csproj +18 -0
  164. data/tracks/csharp/exercises/ledger/LedgerTest.cs +21 -21
  165. data/tracks/csharp/exercises/linked-list/LinkedList.cs +24 -0
  166. data/tracks/csharp/exercises/linked-list/LinkedList.csproj +18 -0
  167. data/tracks/csharp/exercises/linked-list/LinkedListTest.cs +34 -42
  168. data/tracks/csharp/exercises/list-ops/ListOps.cs +46 -0
  169. data/tracks/csharp/exercises/list-ops/ListOps.csproj +18 -0
  170. data/tracks/csharp/exercises/list-ops/ListOpsTest.cs +50 -73
  171. data/tracks/csharp/exercises/luhn/Luhn.cs +9 -0
  172. data/tracks/csharp/exercises/luhn/Luhn.csproj +18 -0
  173. data/tracks/csharp/exercises/luhn/LuhnTest.cs +10 -10
  174. data/tracks/csharp/exercises/markdown/Markdown.csproj +18 -0
  175. data/tracks/csharp/exercises/markdown/MarkdownTest.cs +19 -19
  176. data/tracks/csharp/exercises/matrix/Matrix.cs +34 -0
  177. data/tracks/csharp/exercises/matrix/Matrix.csproj +18 -0
  178. data/tracks/csharp/exercises/matrix/MatrixTest.cs +42 -36
  179. data/tracks/csharp/exercises/meetup/Meetup.cs +23 -0
  180. data/tracks/csharp/exercises/meetup/Meetup.csproj +18 -0
  181. data/tracks/csharp/exercises/meetup/MeetupTest.cs +61 -61
  182. data/tracks/csharp/exercises/minesweeper/Minesweeper.cs +9 -0
  183. data/tracks/csharp/exercises/minesweeper/Minesweeper.csproj +18 -0
  184. data/tracks/csharp/exercises/minesweeper/MinesweeperTest.cs +15 -22
  185. data/tracks/csharp/exercises/nth-prime/NthPrime.cs +11 -0
  186. data/tracks/csharp/exercises/nth-prime/NthPrime.csproj +18 -0
  187. data/tracks/csharp/exercises/nth-prime/NthPrimeTest.cs +15 -14
  188. data/tracks/csharp/exercises/nucleotide-count/NucleotideCount.cs +24 -0
  189. data/tracks/csharp/exercises/nucleotide-count/NucleotideCount.csproj +18 -0
  190. data/tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs +16 -24
  191. data/tracks/csharp/exercises/ocr-numbers/OcrNumbers.cs +9 -0
  192. data/tracks/csharp/exercises/ocr-numbers/OcrNumbers.csproj +18 -0
  193. data/tracks/csharp/exercises/ocr-numbers/OcrNumbersTest.cs +31 -45
  194. data/tracks/csharp/exercises/palindrome-products/PalindromeProducts.cs +42 -0
  195. data/tracks/csharp/exercises/palindrome-products/PalindromeProducts.csproj +18 -0
  196. data/tracks/csharp/exercises/palindrome-products/PalindromeTest.cs +25 -32
  197. data/tracks/csharp/exercises/pangram/Pangram.cs +9 -0
  198. data/tracks/csharp/exercises/pangram/Pangram.csproj +18 -0
  199. data/tracks/csharp/exercises/pangram/PangramTest.cs +21 -31
  200. data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.cs +10 -0
  201. data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.csproj +18 -0
  202. data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequencyTest.cs +17 -24
  203. data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.cs +10 -0
  204. data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.csproj +18 -0
  205. data/tracks/csharp/exercises/pascals-triangle/PascalsTriangleTest.cs +48 -20
  206. data/tracks/csharp/exercises/perfect-numbers/PerfectNumbers.cs +16 -0
  207. data/tracks/csharp/exercises/perfect-numbers/PerfectNumbers.csproj +18 -0
  208. data/tracks/csharp/exercises/perfect-numbers/PerfectNumbersTest.cs +16 -14
  209. data/tracks/csharp/exercises/phone-number/PhoneNumber.cs +24 -0
  210. data/tracks/csharp/exercises/phone-number/PhoneNumber.csproj +18 -0
  211. data/tracks/csharp/exercises/phone-number/PhoneNumberTest.cs +15 -22
  212. data/tracks/csharp/exercises/pig-latin/PigLatin.cs +9 -0
  213. data/tracks/csharp/exercises/pig-latin/PigLatin.csproj +18 -0
  214. data/tracks/csharp/exercises/pig-latin/PigLatinTest.cs +34 -43
  215. data/tracks/csharp/exercises/poker/Poker.cs +10 -0
  216. data/tracks/csharp/exercises/poker/Poker.csproj +18 -0
  217. data/tracks/csharp/exercises/poker/PokerTest.cs +40 -61
  218. data/tracks/csharp/exercises/pov/Pov.cs +43 -0
  219. data/tracks/csharp/exercises/pov/Pov.csproj +18 -0
  220. data/tracks/csharp/exercises/pov/PovTest.cs +24 -30
  221. data/tracks/csharp/exercises/prime-factors/PrimeFactors.cs +9 -0
  222. data/tracks/csharp/exercises/prime-factors/PrimeFactors.csproj +18 -0
  223. data/tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs +23 -34
  224. data/tracks/csharp/exercises/protein-translation/ProteinTranslation.cs +9 -0
  225. data/tracks/csharp/exercises/protein-translation/ProteinTranslation.csproj +18 -0
  226. data/tracks/csharp/exercises/protein-translation/ProteinTranslationTest.cs +37 -35
  227. data/tracks/csharp/exercises/proverb/Proverb.cs +14 -0
  228. data/tracks/csharp/exercises/proverb/Proverb.csproj +18 -0
  229. data/tracks/csharp/exercises/proverb/ProverbTest.cs +9 -12
  230. data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTriplet.cs +29 -0
  231. data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTriplet.csproj +18 -0
  232. data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTripletTest.cs +16 -21
  233. data/tracks/csharp/exercises/queen-attack/Example.cs +5 -14
  234. data/tracks/csharp/exercises/queen-attack/QueenAttack.cs +21 -0
  235. data/tracks/csharp/exercises/queen-attack/QueenAttack.csproj +18 -0
  236. data/tracks/csharp/exercises/queen-attack/QueenAttackTest.cs +17 -31
  237. data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipher.cs +18 -0
  238. data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipher.csproj +18 -0
  239. data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipherTest.cs +13 -18
  240. data/tracks/csharp/exercises/raindrops/Raindrops.cs +9 -0
  241. data/tracks/csharp/exercises/raindrops/Raindrops.csproj +18 -0
  242. data/tracks/csharp/exercises/raindrops/RaindropsTest.cs +29 -29
  243. data/tracks/csharp/exercises/react/React.cs +28 -0
  244. data/tracks/csharp/exercises/react/React.csproj +18 -0
  245. data/tracks/csharp/exercises/react/ReactTest.cs +24 -30
  246. data/tracks/csharp/exercises/rectangles/Example.cs +18 -19
  247. data/tracks/csharp/exercises/rectangles/Rectangles.cs +9 -0
  248. data/tracks/csharp/exercises/rectangles/Rectangles.csproj +18 -0
  249. data/tracks/csharp/exercises/rectangles/RectanglesTest.cs +21 -30
  250. data/tracks/csharp/exercises/rna-transcription/RnaTranscription.cs +9 -0
  251. data/tracks/csharp/exercises/rna-transcription/RnaTranscription.csproj +18 -0
  252. data/tracks/csharp/exercises/rna-transcription/RnaTranscriptionTest.cs +34 -0
  253. data/tracks/csharp/exercises/robot-name/RobotName.cs +17 -0
  254. data/tracks/csharp/exercises/robot-name/RobotName.csproj +18 -0
  255. data/tracks/csharp/exercises/robot-name/RobotNameTest.cs +10 -20
  256. data/tracks/csharp/exercises/robot-simulator/RobotSimulator.cs +64 -0
  257. data/tracks/csharp/exercises/robot-simulator/RobotSimulator.csproj +18 -0
  258. data/tracks/csharp/exercises/robot-simulator/RobotSimulatorTest.cs +19 -24
  259. data/tracks/csharp/exercises/roman-numerals/RomanNumerals.cs +9 -0
  260. data/tracks/csharp/exercises/roman-numerals/RomanNumerals.csproj +18 -0
  261. data/tracks/csharp/exercises/roman-numerals/RomanNumeralsTest.cs +23 -23
  262. data/tracks/csharp/exercises/run-length-encoding/RunLengthEncoding.cs +14 -0
  263. data/tracks/csharp/exercises/run-length-encoding/RunLengthEncoding.csproj +18 -0
  264. data/tracks/csharp/exercises/run-length-encoding/RunLengthEncodingTest.cs +15 -21
  265. data/tracks/csharp/exercises/saddle-points/SaddlePointTest.cs +11 -15
  266. data/tracks/csharp/exercises/saddle-points/SaddlePoints.cs +15 -0
  267. data/tracks/csharp/exercises/saddle-points/SaddlePoints.csproj +18 -0
  268. data/tracks/csharp/exercises/say/Example.cs +1 -1
  269. data/tracks/csharp/exercises/say/Say.cs +9 -0
  270. data/tracks/csharp/exercises/say/Say.csproj +18 -0
  271. data/tracks/csharp/exercises/say/SayTest.cs +34 -48
  272. data/tracks/csharp/exercises/scale-generator/Example.cs +1 -1
  273. data/tracks/csharp/exercises/scale-generator/ScaleGenerator.cs +9 -0
  274. data/tracks/csharp/exercises/scale-generator/ScaleGenerator.csproj +18 -0
  275. data/tracks/csharp/exercises/scale-generator/ScaleGeneratorTest.cs +29 -42
  276. data/tracks/csharp/exercises/scrabble-score/ScrabbleScore.cs +9 -0
  277. data/tracks/csharp/exercises/scrabble-score/ScrabbleScore.csproj +18 -0
  278. data/tracks/csharp/exercises/scrabble-score/ScrabbleScoreTest.cs +19 -28
  279. data/tracks/csharp/exercises/secret-handshake/SecretHandshake.cs +10 -0
  280. data/tracks/csharp/exercises/secret-handshake/SecretHandshake.csproj +18 -0
  281. data/tracks/csharp/exercises/secret-handshake/SecretHandshakeTest.cs +15 -22
  282. data/tracks/csharp/exercises/series/Series.cs +13 -0
  283. data/tracks/csharp/exercises/series/Series.csproj +18 -0
  284. data/tracks/csharp/exercises/series/SeriesTest.cs +26 -25
  285. data/tracks/csharp/exercises/sgf-parsing/Example.cs +11 -1
  286. data/tracks/csharp/exercises/sgf-parsing/SgfParsing.cs +12 -3
  287. data/tracks/csharp/exercises/sgf-parsing/SgfParsing.csproj +19 -0
  288. data/tracks/csharp/exercises/sgf-parsing/SgfParsingTest.cs +27 -37
  289. data/tracks/csharp/exercises/sieve/Sieve.cs +9 -0
  290. data/tracks/csharp/exercises/sieve/Sieve.csproj +18 -0
  291. data/tracks/csharp/exercises/sieve/SieveTest.cs +8 -12
  292. data/tracks/csharp/exercises/simple-cipher/SimpleCipher.cs +32 -0
  293. data/tracks/csharp/exercises/simple-cipher/SimpleCipher.csproj +18 -0
  294. data/tracks/csharp/exercises/simple-cipher/SimpleCipherTest.cs +44 -75
  295. data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedList.cs +48 -0
  296. data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedList.csproj +18 -0
  297. data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedListTest.cs +31 -35
  298. data/tracks/csharp/exercises/space-age/Example.cs +21 -21
  299. data/tracks/csharp/exercises/space-age/SpaceAge.cs +48 -0
  300. data/tracks/csharp/exercises/space-age/SpaceAge.csproj +18 -0
  301. data/tracks/csharp/exercises/space-age/SpaceAgeTest.cs +24 -41
  302. data/tracks/csharp/exercises/strain/Strain.cs +15 -0
  303. data/tracks/csharp/exercises/strain/Strain.csproj +18 -0
  304. data/tracks/csharp/exercises/strain/StrainTest.cs +25 -37
  305. data/tracks/csharp/exercises/sublist/Sublist.cs +19 -0
  306. data/tracks/csharp/exercises/sublist/Sublist.csproj +18 -0
  307. data/tracks/csharp/exercises/sublist/SublistTest.cs +37 -54
  308. data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiples.cs +10 -0
  309. data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiples.csproj +18 -0
  310. data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs +15 -22
  311. data/tracks/csharp/exercises/tournament/Tournament.cs +10 -0
  312. data/tracks/csharp/exercises/tournament/Tournament.csproj +18 -0
  313. data/tracks/csharp/exercises/tournament/TournamentTest.cs +10 -13
  314. data/tracks/csharp/exercises/transpose/Transpose.cs +9 -0
  315. data/tracks/csharp/exercises/transpose/Transpose.csproj +18 -0
  316. data/tracks/csharp/exercises/transpose/TransposeTest.cs +21 -30
  317. data/tracks/csharp/exercises/tree-building/TreeBuilding.csproj +18 -0
  318. data/tracks/csharp/exercises/tree-building/TreeBuildingTest.cs +27 -26
  319. data/tracks/csharp/exercises/triangle/Example.cs +1 -1
  320. data/tracks/csharp/exercises/triangle/Triangle.cs +18 -0
  321. data/tracks/csharp/exercises/triangle/Triangle.csproj +18 -0
  322. data/tracks/csharp/exercises/triangle/TriangleTest.cs +26 -41
  323. data/tracks/csharp/exercises/twelve-days/Example.cs +4 -4
  324. data/tracks/csharp/exercises/twelve-days/TwelveDays.cs +19 -0
  325. data/tracks/csharp/exercises/twelve-days/TwelveDays.csproj +18 -0
  326. data/tracks/csharp/exercises/twelve-days/TwelveDaysTest.cs +29 -51
  327. data/tracks/csharp/exercises/two-bucket/TwoBucket.cs +27 -0
  328. data/tracks/csharp/exercises/two-bucket/TwoBucket.csproj +18 -0
  329. data/tracks/csharp/exercises/two-bucket/TwoBucketTest.cs +17 -20
  330. data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantity.cs +14 -0
  331. data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantity.csproj +18 -0
  332. data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantityTest.cs +40 -51
  333. data/tracks/csharp/exercises/word-count/Example.cs +1 -1
  334. data/tracks/csharp/exercises/word-count/WordCount.cs +10 -0
  335. data/tracks/csharp/exercises/word-count/WordCount.csproj +18 -0
  336. data/tracks/csharp/exercises/word-count/WordCountTest.cs +23 -34
  337. data/tracks/csharp/exercises/word-search/Example.cs +18 -20
  338. data/tracks/csharp/exercises/word-search/WordSearch.cs +16 -0
  339. data/tracks/csharp/exercises/word-search/WordSearch.csproj +18 -0
  340. data/tracks/csharp/exercises/word-search/WordSearchTest.cs +30 -31
  341. data/tracks/csharp/exercises/wordy/Example.cs +1 -1
  342. data/tracks/csharp/exercises/wordy/Wordy.cs +9 -0
  343. data/tracks/csharp/exercises/wordy/Wordy.csproj +18 -0
  344. data/tracks/csharp/exercises/wordy/WordyTest.cs +34 -49
  345. data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzle.cs +22 -0
  346. data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzle.csproj +18 -0
  347. data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzleTest.cs +5 -6
  348. data/tracks/csharp/exercises/zipper/Zipper.cs +64 -0
  349. data/tracks/csharp/exercises/zipper/Zipper.csproj +18 -0
  350. data/tracks/csharp/exercises/zipper/ZipperTest.cs +31 -29
  351. data/tracks/csharp/paket.dependencies +1 -5
  352. data/tracks/csharp/paket.lock +1 -78
  353. data/tracks/go/README.md +10 -3
  354. data/tracks/go/bin/test-without-stubs +1 -1
  355. data/tracks/go/docs/TESTS.md +7 -0
  356. data/tracks/go/exercises/beer-song/example.go +1 -1
  357. data/tracks/go/exercises/binary-search/binary_search_test.go +1 -1
  358. data/tracks/go/exercises/clock/example_clock_test.go +40 -0
  359. data/tracks/go/exercises/grade-school/grade_school_test.go +1 -1
  360. data/tracks/go/exercises/hello-world/hello_example_test.go +20 -0
  361. data/tracks/go/exercises/minesweeper/minesweeper_test.go +1 -1
  362. data/tracks/go/exercises/pov/pov_test.go +4 -1
  363. data/tracks/java/exercises/pangram/src/example/java/{Pangrams.java → PangramChecker.java} +5 -3
  364. data/tracks/java/exercises/pangram/src/main/java/PangramChecker.java +6 -0
  365. data/tracks/java/exercises/pangram/src/test/java/PangramCheckerTest.java +82 -0
  366. data/tracks/ocaml/exercises/run-length-encoding/test.ml +9 -1
  367. data/tracks/ocaml/tools/test-generator/src/parser.ml +1 -1
  368. data/tracks/ocaml/tools/test-generator/src/special_cases.ml +15 -7
  369. data/tracks/python/exercises/list-ops/example.py +6 -6
  370. data/tracks/python/exercises/list-ops/list_ops_test.py +22 -37
  371. data/tracks/typescript/.gitignore +1 -1
  372. data/tracks/typescript/config.json +12 -0
  373. data/tracks/typescript/exercises/etl/etl.example.ts +16 -0
  374. data/tracks/typescript/exercises/etl/etl.test.ts +48 -0
  375. data/tracks/typescript/exercises/etl/package.json +36 -0
  376. data/tracks/typescript/exercises/etl/tsconfig.json +21 -0
  377. data/tracks/typescript/exercises/etl/tslint.json +127 -0
  378. data/tracks/typescript/exercises/etl/yarn.lock +2739 -0
  379. data/tracks/typescript/exercises/robot-name/robot-name.example.ts +1 -1
  380. data/tracks/typescript/exercises/space-age/package.json +36 -0
  381. data/tracks/typescript/exercises/space-age/space-age.example.ts +21 -0
  382. data/tracks/typescript/exercises/space-age/space-age.test.ts +56 -0
  383. data/tracks/typescript/exercises/space-age/tsconfig.json +21 -0
  384. data/tracks/typescript/exercises/space-age/tslint.json +127 -0
  385. data/tracks/typescript/exercises/space-age/yarn.lock +2739 -0
  386. metadata +226 -26
  387. data/tracks/csharp/docs/img/AddFiles.png +0 -0
  388. data/tracks/csharp/docs/img/SolutionExplorer.png +0 -0
  389. data/tracks/csharp/docs/img/TestExplorer.png +0 -0
  390. data/tracks/csharp/docs/img/addNewClass.png +0 -0
  391. data/tracks/csharp/docs/img/createNewProject.png +0 -0
  392. data/tracks/csharp/docs/img/dragDropFolders.png +0 -0
  393. data/tracks/csharp/docs/img/nUnitExecuteTests.png +0 -0
  394. data/tracks/csharp/docs/img/nUnitRunner.png +0 -0
  395. data/tracks/csharp/docs/img/newProject.png +0 -0
  396. data/tracks/csharp/docs/img/nugetManageNunitRunner.png +0 -0
  397. data/tracks/csharp/docs/img/nugetMenu.png +0 -0
  398. data/tracks/csharp/docs/img/xamarin-add-new-project.png +0 -0
  399. data/tracks/csharp/docs/img/xamarin-add-reference.png +0 -0
  400. data/tracks/csharp/docs/img/xamarin-csharp.jpg +0 -0
  401. data/tracks/csharp/docs/img/xamarin-edit-reference.png +0 -0
  402. data/tracks/csharp/docs/img/xamarin-naming.png +0 -0
  403. data/tracks/csharp/docs/img/xamarin-nunit.jpg +0 -0
  404. data/tracks/csharp/docs/img/xamarin-tests.png +0 -0
  405. data/tracks/csharp/exercises/exercises.csproj +0 -363
  406. data/tracks/csharp/exercises/paket.references +0 -2
  407. data/tracks/csharp/exercises/rna-transcription/ComplementTest.cs +0 -39
  408. data/tracks/java/exercises/pangram/src/main/java/.keep +0 -0
  409. data/tracks/java/exercises/pangram/src/test/java/PangramsTest.java +0 -75
@@ -1,8 +1,8 @@
1
- using NUnit.Framework;
1
+ using Xunit;
2
2
 
3
3
  public class HouseTest
4
4
  {
5
- [Test]
5
+ [Fact]
6
6
  public void Rhyme_is_correct()
7
7
  {
8
8
  const string expected =
@@ -96,6 +96,6 @@ public class HouseTest
96
96
  "that ate the malt\n" +
97
97
  "that lay in the house that Jack built.";
98
98
 
99
- Assert.That(House.Rhyme(), Is.EqualTo(expected));
99
+ Assert.Equal(expected, House.Rhyme());
100
100
  }
101
101
  }
@@ -0,0 +1,9 @@
1
+ using System;
2
+
3
+ public static class Isogram
4
+ {
5
+ public static bool IsIsogram(string word)
6
+ {
7
+ throw new NotImplementedException("You need to implement this function.");
8
+ }
9
+ }
@@ -0,0 +1,18 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+
3
+ <PropertyGroup>
4
+ <OutputType>Exe</OutputType>
5
+ <TargetFramework>netcoreapp1.0</TargetFramework>
6
+ </PropertyGroup>
7
+
8
+ <ItemGroup>
9
+ <Compile Remove="Example.cs" />
10
+ </ItemGroup>
11
+
12
+ <ItemGroup>
13
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
14
+ <PackageReference Include="xunit" Version="2.2.0" />
15
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
16
+ </ItemGroup>
17
+
18
+ </Project>
@@ -1,20 +1,20 @@
1
- using NUnit.Framework;
1
+ using Xunit;
2
2
 
3
- [TestFixture]
4
3
  public class IsogramTest
5
4
  {
6
- [TestCase("duplicates", ExpectedResult = true)]
7
- [TestCase("eleven", ExpectedResult = false, Ignore = "Remove to run test case")]
8
- [TestCase("subdermatoglyphic", ExpectedResult = true, Ignore = "Remove to run test case")]
9
- [TestCase("Alphabet", ExpectedResult = false, Ignore = "Remove to run test case")]
10
- [TestCase("thumbscrew-japingly", ExpectedResult = true, Ignore = "Remove to run test case")]
11
- [TestCase("Hjelmqvist-Gryb-Zock-Pfund-Wax", ExpectedResult = true, Ignore = "Remove to run test case")]
12
- [TestCase("Heizölrückstoßabdämpfung", ExpectedResult = true, Ignore = "Remove to run test case")]
13
- [TestCase("the quick brown fox", ExpectedResult = false, Ignore = "Remove to run test case")]
14
- [TestCase("Emily Jung Schwartzkopf", ExpectedResult = true, Ignore = "Remove to run test case")]
15
- [TestCase("éléphant", ExpectedResult = false, Ignore = "Remove to run test case")]
16
- public bool Isogram_correctly_detects_isograms(string input)
5
+ [Theory]
6
+ [InlineData("duplicates", true)]
7
+ [InlineData("eleven", false)]
8
+ [InlineData("subdermatoglyphic", true)]
9
+ [InlineData("Alphabet", false)]
10
+ [InlineData("thumbscrew-japingly", true)]
11
+ [InlineData("Hjelmqvist-Gryb-Zock-Pfund-Wax", true)]
12
+ [InlineData("Heizölrückstoßabdämpfung", true)]
13
+ [InlineData("the quick brown fox", false)]
14
+ [InlineData("Emily Jung Schwartzkopf", true)]
15
+ [InlineData("éléphant", false)]
16
+ public void Isogram_correctly_detects_isograms(string input, bool expected)
17
17
  {
18
- return Isogram.IsIsogram(input);
18
+ Assert.Equal(expected, Isogram.IsIsogram(input));
19
19
  }
20
20
  }
@@ -1,65 +1,60 @@
1
- using NUnit.Framework;
1
+ using Xunit;
2
2
 
3
3
  public class KinderGartenGardenTest
4
4
  {
5
- [Test]
5
+ [Fact]
6
6
  public void Missing_child()
7
7
  {
8
8
  var actual = Garden.DefaultGarden("RC\nGG").GetPlants("Potter");
9
- Assert.That(actual, Is.Empty);
9
+ Assert.Empty(actual);
10
10
  }
11
11
 
12
- [Ignore("Remove to run test")]
13
- [Test]
12
+ [Fact(Skip = "Remove to run test")]
14
13
  public void Alice()
15
14
  {
16
- Assert.That(Garden.DefaultGarden("RC\nGG").GetPlants("Alice"), Is.EqualTo(new [] { Plant.Radishes, Plant.Clover, Plant.Grass, Plant.Grass }));
17
- Assert.That(Garden.DefaultGarden("VC\nRC").GetPlants("Alice"), Is.EqualTo(new[] { Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Clover }));
15
+ Assert.Equal(new [] { Plant.Radishes, Plant.Clover, Plant.Grass, Plant.Grass }, Garden.DefaultGarden("RC\nGG").GetPlants("Alice"));
16
+ Assert.Equal(new[] { Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Clover }, Garden.DefaultGarden("VC\nRC").GetPlants("Alice"));
18
17
  }
19
18
 
20
- [Ignore("Remove to run test")]
21
- [Test]
19
+ [Fact(Skip = "Remove to run test")]
22
20
  public void Small_garden()
23
21
  {
24
22
  var actual = Garden.DefaultGarden("VVCG\nVVRC").GetPlants("Bob");
25
- Assert.That(actual, Is.EqualTo(new[] { Plant.Clover, Plant.Grass, Plant.Radishes, Plant.Clover }));
23
+ Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Radishes, Plant.Clover }, actual);
26
24
  }
27
25
 
28
- [Ignore("Remove to run test")]
29
- [Test]
26
+ [Fact(Skip = "Remove to run test")]
30
27
  public void Medium_garden()
31
28
  {
32
29
  var garden = Garden.DefaultGarden("VVCCGG\nVVCCGG");
33
- Assert.That(garden.GetPlants("Bob"), Is.EqualTo(new[] { Plant.Clover, Plant.Clover, Plant.Clover, Plant.Clover }));
34
- Assert.That(garden.GetPlants("Charlie"), Is.EqualTo(new[] { Plant.Grass, Plant.Grass, Plant.Grass, Plant.Grass }));
30
+ Assert.Equal(new[] { Plant.Clover, Plant.Clover, Plant.Clover, Plant.Clover }, garden.GetPlants("Bob"));
31
+ Assert.Equal(new[] { Plant.Grass, Plant.Grass, Plant.Grass, Plant.Grass }, garden.GetPlants("Charlie"));
35
32
  }
36
33
 
37
- [Ignore("Remove to run test")]
38
- [Test]
34
+ [Fact(Skip = "Remove to run test")]
39
35
  public void Full_garden()
40
36
  {
41
37
  var garden = Garden.DefaultGarden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV");
42
- Assert.That(garden.GetPlants("Alice"), Is.EqualTo(new[] { Plant.Violets, Plant.Radishes, Plant.Violets, Plant.Radishes }));
43
- Assert.That(garden.GetPlants("Bob"), Is.EqualTo(new[] { Plant.Clover, Plant.Grass, Plant.Clover, Plant.Clover }));
44
- Assert.That(garden.GetPlants("David"), Is.EqualTo(new[] { Plant.Radishes, Plant.Violets, Plant.Clover, Plant.Radishes }));
45
- Assert.That(garden.GetPlants("Eve"), Is.EqualTo(new[] { Plant.Clover, Plant.Grass, Plant.Radishes, Plant.Grass }));
46
- Assert.That(garden.GetPlants("Fred"), Is.EqualTo(new[] { Plant.Grass, Plant.Clover, Plant.Violets, Plant.Clover }));
47
- Assert.That(garden.GetPlants("Ginny"), Is.EqualTo(new[] { Plant.Clover, Plant.Grass, Plant.Grass, Plant.Clover }));
48
- Assert.That(garden.GetPlants("Harriet"), Is.EqualTo(new[] { Plant.Violets, Plant.Radishes, Plant.Radishes, Plant.Violets }));
49
- Assert.That(garden.GetPlants("Ileana"), Is.EqualTo(new[] { Plant.Grass, Plant.Clover, Plant.Violets, Plant.Clover }));
50
- Assert.That(garden.GetPlants("Joseph"), Is.EqualTo(new[] { Plant.Violets, Plant.Clover, Plant.Violets, Plant.Grass }));
51
- Assert.That(garden.GetPlants("Kincaid"), Is.EqualTo(new[] { Plant.Grass, Plant.Clover, Plant.Clover, Plant.Grass }));
52
- Assert.That(garden.GetPlants("Larry"), Is.EqualTo(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Violets }));
38
+ Assert.Equal(new[] { Plant.Violets, Plant.Radishes, Plant.Violets, Plant.Radishes }, garden.GetPlants("Alice"));
39
+ Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Clover, Plant.Clover }, garden.GetPlants("Bob"));
40
+ Assert.Equal(new[] { Plant.Radishes, Plant.Violets, Plant.Clover, Plant.Radishes }, garden.GetPlants("David"));
41
+ Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Radishes, Plant.Grass }, garden.GetPlants("Eve"));
42
+ Assert.Equal(new[] { Plant.Grass, Plant.Clover, Plant.Violets, Plant.Clover }, garden.GetPlants("Fred"));
43
+ Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Grass, Plant.Clover }, garden.GetPlants("Ginny"));
44
+ Assert.Equal(new[] { Plant.Violets, Plant.Radishes, Plant.Radishes, Plant.Violets }, garden.GetPlants("Harriet"));
45
+ Assert.Equal(new[] { Plant.Grass, Plant.Clover, Plant.Violets, Plant.Clover }, garden.GetPlants("Ileana"));
46
+ Assert.Equal(new[] { Plant.Violets, Plant.Clover, Plant.Violets, Plant.Grass }, garden.GetPlants("Joseph"));
47
+ Assert.Equal(new[] { Plant.Grass, Plant.Clover, Plant.Clover, Plant.Grass }, garden.GetPlants("Kincaid"));
48
+ Assert.Equal(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Violets }, garden.GetPlants("Larry"));
53
49
  }
54
50
 
55
- [Ignore("Remove to run test")]
56
- [Test]
51
+ [Fact(Skip = "Remove to run test")]
57
52
  public void Surprise_garden()
58
53
  {
59
54
  var garden = new Garden(new [] { "Samantha", "Patricia", "Xander", "Roger" }, "VCRRGVRG\nRVGCCGCV");
60
- Assert.That(garden.GetPlants("Patricia"), Is.EqualTo(new[] { Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Violets }));
61
- Assert.That(garden.GetPlants("Roger"), Is.EqualTo(new[] { Plant.Radishes, Plant.Radishes, Plant.Grass, Plant.Clover }));
62
- Assert.That(garden.GetPlants("Samantha"), Is.EqualTo(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Grass }));
63
- Assert.That(garden.GetPlants("Xander"), Is.EqualTo(new[] { Plant.Radishes, Plant.Grass, Plant.Clover, Plant.Violets }));
55
+ Assert.Equal(new[] { Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Violets }, garden.GetPlants("Patricia"));
56
+ Assert.Equal(new[] { Plant.Radishes, Plant.Radishes, Plant.Grass, Plant.Clover }, garden.GetPlants("Roger"));
57
+ Assert.Equal(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Grass }, garden.GetPlants("Samantha"));
58
+ Assert.Equal(new[] { Plant.Radishes, Plant.Grass, Plant.Clover, Plant.Violets }, garden.GetPlants("Xander"));
64
59
  }
65
60
  }
@@ -0,0 +1,27 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+
4
+ public enum Plant
5
+ {
6
+ Violets,
7
+ Radishes,
8
+ Clover,
9
+ Grass
10
+ }
11
+
12
+ public class Garden
13
+ {
14
+ public Garden(IEnumerable<string> children, string windowSills)
15
+ {
16
+ }
17
+
18
+ public IEnumerable<Plant> GetPlants(string child)
19
+ {
20
+ throw new NotImplementedException("You need to implement this function.");
21
+ }
22
+
23
+ public static Garden DefaultGarden(string windowSills)
24
+ {
25
+ throw new NotImplementedException("You need to implement this function.");
26
+ }
27
+ }
@@ -0,0 +1,18 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+
3
+ <PropertyGroup>
4
+ <OutputType>Exe</OutputType>
5
+ <TargetFramework>netcoreapp1.0</TargetFramework>
6
+ </PropertyGroup>
7
+
8
+ <ItemGroup>
9
+ <Compile Remove="Example.cs" />
10
+ </ItemGroup>
11
+
12
+ <ItemGroup>
13
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
14
+ <PackageReference Include="xunit" Version="2.2.0" />
15
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
16
+ </ItemGroup>
17
+
18
+ </Project>
@@ -0,0 +1,9 @@
1
+ using System;
2
+
3
+ public static class LargestSeriesProduct
4
+ {
5
+ public static long GetLargestProduct(string digits, int span)
6
+ {
7
+ throw new NotImplementedException("You need to implement this function.");
8
+ }
9
+ }
@@ -0,0 +1,18 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+
3
+ <PropertyGroup>
4
+ <OutputType>Exe</OutputType>
5
+ <TargetFramework>netcoreapp1.0</TargetFramework>
6
+ </PropertyGroup>
7
+
8
+ <ItemGroup>
9
+ <Compile Remove="Example.cs" />
10
+ </ItemGroup>
11
+
12
+ <ItemGroup>
13
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
14
+ <PackageReference Include="xunit" Version="2.2.0" />
15
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
16
+ </ItemGroup>
17
+
18
+ </Project>
@@ -1,153 +1,139 @@
1
1
  using System;
2
- using NUnit.Framework;
2
+ using Xunit;
3
3
 
4
- [TestFixture]
5
4
  public class LargestSeriesProductTest
6
5
  {
7
- [Test]
6
+ [Fact]
8
7
  public void Can_find_the_largest_product_of_2_with_numbers_in_order()
9
8
  {
10
9
  const string digits = "0123456789";
11
10
  const int span = 2;
12
11
  const int expected = 72;
13
12
 
14
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
13
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
15
14
  }
16
15
 
17
- [Ignore("Remove to run test")]
18
- [Test]
16
+ [Fact(Skip = "Remove to run test")]
19
17
  public void Can_find_the_largest_product_of_2()
20
18
  {
21
19
  const string digits = "576802143";
22
20
  const int span = 2;
23
21
  const int expected = 48;
24
22
 
25
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
23
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
26
24
  }
27
25
 
28
- [Ignore("Remove to run test")]
29
- [Test]
26
+ [Fact(Skip = "Remove to run test")]
30
27
  public void Finds_the_largest_product_if_span_equals_length()
31
28
  {
32
29
  const string digits = "29";
33
30
  const int span = 2;
34
31
  const int expected = 18;
35
32
 
36
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
33
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
37
34
  }
38
35
 
39
- [Ignore("Remove to run test")]
40
- [Test]
36
+ [Fact(Skip = "Remove to run test")]
41
37
  public void Can_find_the_largest_product_of_3_with_numbers_in_order()
42
38
  {
43
39
  const string digits = "0123456789";
44
40
  const int span = 3;
45
41
  const int expected = 504;
46
42
 
47
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
43
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
48
44
  }
49
45
 
50
- [Ignore("Remove to run test")]
51
- [Test]
46
+ [Fact(Skip = "Remove to run test")]
52
47
  public void Can_find_the_largest_product_of_3()
53
48
  {
54
49
  const string digits = "1027839564";
55
50
  const int span = 3;
56
51
  const int expected = 270;
57
52
 
58
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
53
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
59
54
  }
60
55
 
61
- [Ignore("Remove to run test")]
62
- [Test]
56
+ [Fact(Skip = "Remove to run test")]
63
57
  public void Can_find_the_largest_product_of_5_with_numbers_in_order()
64
58
  {
65
59
  const string digits = "0123456789";
66
60
  const int span = 5;
67
61
  const int expected = 15120;
68
62
 
69
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
63
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
70
64
  }
71
65
 
72
- [Ignore("Remove to run test")]
73
- [Test]
66
+ [Fact(Skip = "Remove to run test")]
74
67
  public void Can_get_the_largest_product_of_a_big_number()
75
68
  {
76
69
  const string digits = "73167176531330624919225119674426574742355349194934";
77
70
  const int span = 6;
78
71
  const int expected = 23520;
79
72
 
80
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
73
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
81
74
  }
82
75
 
83
- [Ignore("Remove to run test")]
84
- [Test]
76
+ [Fact(Skip = "Remove to run test")]
85
77
  public void Can_get_the_largest_product_of_a_big_number_II()
86
78
  {
87
79
  const string digits = "52677741234314237566414902593461595376319419139427";
88
80
  const int span = 6;
89
81
  const int expected = 28350;
90
82
 
91
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
83
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
92
84
  }
93
85
 
94
- [Ignore("Remove to run test")]
95
- [Test]
86
+ [Fact(Skip = "Remove to run test")]
96
87
  public void Can_get_the_largest_product_of_a_big_number_III()
97
88
  {
98
89
  const string digits = "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450";
99
90
  const int span = 13;
100
91
  const long expected = 23514624000;
101
92
 
102
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
93
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
103
94
  }
104
95
 
105
- [Ignore("Remove to run test")]
106
- [Test]
96
+ [Fact(Skip = "Remove to run test")]
107
97
  public void Reports_zero_if_the_only_digits_are_zero()
108
98
  {
109
99
  const string digits = "0000";
110
100
  const int span = 2;
111
101
  const int expected = 0;
112
102
 
113
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
103
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
114
104
  }
115
105
 
116
- [Ignore("Remove to run test")]
117
- [Test]
106
+ [Fact(Skip = "Remove to run test")]
118
107
  public void Reports_zero_if_all_spans_include_zero()
119
108
  {
120
109
  const string digits = "99099";
121
110
  const int span = 3;
122
111
  const int expected = 0;
123
112
 
124
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
113
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
125
114
  }
126
115
 
127
- [Ignore("Remove to run test")]
128
- [Test]
116
+ [Fact(Skip = "Remove to run test")]
129
117
  public void Reports_1_for_empty_string_and_empty_product_0_span()
130
118
  {
131
119
  const string digits = "";
132
120
  const int span = 0;
133
121
  const int expected = 1;
134
122
 
135
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
123
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
136
124
  }
137
125
 
138
- [Ignore("Remove to run test")]
139
- [Test]
126
+ [Fact(Skip = "Remove to run test")]
140
127
  public void Reports_1_for_nonempty_string_and_empty_product_0_span()
141
128
  {
142
129
  const string digits = "123";
143
130
  const int span = 0;
144
131
  const int expected = 1;
145
132
 
146
- Assert.That(LargestSeriesProduct.GetLargestProduct(digits, span), Is.EqualTo(expected));
133
+ Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
147
134
  }
148
135
 
149
- [Ignore("Remove to run test")]
150
- [Test]
136
+ [Fact(Skip = "Remove to run test")]
151
137
  public void Rejects_span_longer_than_string_length()
152
138
  {
153
139
  const string digits = "123";
@@ -156,8 +142,7 @@ public class LargestSeriesProductTest
156
142
  Assert.Throws<ArgumentException>(() => LargestSeriesProduct.GetLargestProduct(digits, span));
157
143
  }
158
144
 
159
- [Ignore("Remove to run test")]
160
- [Test]
145
+ [Fact(Skip = "Remove to run test")]
161
146
  public void Rejects_empty_string_and_nonzero_span()
162
147
  {
163
148
  const string digits = "";
@@ -166,8 +151,7 @@ public class LargestSeriesProductTest
166
151
  Assert.Throws<ArgumentException>(() => LargestSeriesProduct.GetLargestProduct(digits, span));
167
152
  }
168
153
 
169
- [Ignore("Remove to run test")]
170
- [Test]
154
+ [Fact(Skip = "Remove to run test")]
171
155
  public void Rejects_invalid_character_in_digits()
172
156
  {
173
157
  const string digits = "1234a5";
@@ -176,8 +160,7 @@ public class LargestSeriesProductTest
176
160
  Assert.Throws<ArgumentException>(() => LargestSeriesProduct.GetLargestProduct(digits, span));
177
161
  }
178
162
 
179
- [Ignore("Remove to run test")]
180
- [Test]
163
+ [Fact(Skip = "Remove to run test")]
181
164
  public void Rejects_negative_span()
182
165
  {
183
166
  const string digits = "12345";