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,28 +1,26 @@
1
1
  using System.Collections.Generic;
2
+ using System.Linq;
2
3
 
3
4
  public class School
4
5
  {
5
- public IDictionary<int, IList<string>> Roster { get; private set; }
6
-
7
- public School()
8
- {
9
- Roster = new Dictionary<int, IList<string>>();
10
- }
11
-
6
+ private readonly Dictionary<int, IList<string>> roster = new Dictionary<int, IList<string>>();
7
+
12
8
  public void Add(string student, int grade)
13
9
  {
14
- if (Roster.ContainsKey(grade))
15
- Roster[grade].Add(student);
10
+ if (roster.ContainsKey(grade))
11
+ roster[grade].Add(student);
16
12
  else
17
- Roster.Add(grade, new SortedList<string> { student });
13
+ roster.Add(grade, new SortedList<string> { student });
18
14
  }
19
15
 
20
- public IList<string> Grade(int grade)
16
+ public IEnumerable<string> Roster(int grade) => roster[grade];
17
+
18
+ public IEnumerable<string> Grade(int grade)
21
19
  {
22
20
  IList<string> students;
23
- if (Roster.TryGetValue(grade, out students))
24
- return students;
25
- return new List<string>(0);
21
+ if (roster.TryGetValue(grade, out students))
22
+ return students.AsEnumerable();
23
+ return Enumerable.Empty<string>();
26
24
  }
27
25
  }
28
26
 
@@ -0,0 +1,20 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+
4
+ public class School
5
+ {
6
+ public void Add(string student, int grade)
7
+ {
8
+ throw new NotImplementedException("You need to implement this function.");
9
+ }
10
+
11
+ public IEnumerable<string> Roster(int grade)
12
+ {
13
+ throw new NotImplementedException("You need to implement this function.");
14
+ }
15
+
16
+ public IEnumerable<string> Grade(int grade)
17
+ {
18
+ throw new NotImplementedException("You need to implement this function.");
19
+ }
20
+ }
@@ -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,81 +1,61 @@
1
- using System.Collections.Generic;
2
- using NUnit.Framework;
1
+ using Xunit;
3
2
 
4
- [TestFixture]
5
3
  public class GradeSchoolTest
6
4
  {
7
- private School school;
8
-
9
- [SetUp]
10
- public void Setup()
11
- {
12
- school = new School();
13
- }
14
-
15
- [Test]
16
- public void New_school_has_an_empty_roster()
17
- {
18
- Assert.That(school.Roster, Has.Count.EqualTo(0));
19
- }
20
-
21
- [Ignore("Remove to run test")]
22
- [Test]
5
+ private readonly School school = new School();
6
+
7
+ [Fact]
23
8
  public void Adding_a_student_adds_them_to_the_roster_for_the_given_grade()
24
9
  {
25
10
  school.Add("Aimee", 2);
26
- var expected = new List<string> { "Aimee" };
27
- Assert.That(school.Roster[2], Is.EqualTo(expected));
11
+ var expected = new [] { "Aimee" };
12
+ Assert.Equal(expected, school.Roster(2));
28
13
  }
29
14
 
30
- [Ignore("Remove to run test")]
31
- [Test]
15
+ [Fact(Skip = "Remove to run test")]
32
16
  public void Adding_more_students_to_the_same_grade_adds_them_to_the_roster()
33
17
  {
34
18
  school.Add("Blair", 2);
35
19
  school.Add("James", 2);
36
20
  school.Add("Paul", 2);
37
- var expected = new List<string> { "Blair", "James", "Paul" };
38
- Assert.That(school.Roster[2], Is.EqualTo(expected));
21
+ var expected = new [] { "Blair", "James", "Paul" };
22
+ Assert.Equal(expected, school.Roster(2));
39
23
  }
40
24
 
41
- [Ignore("Remove to run test")]
42
- [Test]
25
+ [Fact(Skip = "Remove to run test")]
43
26
  public void Adding_students_to_different_grades_adds_them_to_the_roster()
44
27
  {
45
28
  school.Add("Chelsea", 3);
46
29
  school.Add("Logan", 7);
47
- Assert.That(school.Roster[3], Is.EqualTo(new List<string> { "Chelsea" }));
48
- Assert.That(school.Roster[7], Is.EqualTo(new List<string> { "Logan" }));
30
+ Assert.Equal(new [] { "Chelsea" }, school.Roster(3));
31
+ Assert.Equal(new [] { "Logan" }, school.Roster(7));
49
32
  }
50
33
 
51
- [Ignore("Remove to run test")]
52
- [Test]
34
+ [Fact(Skip = "Remove to run test")]
53
35
  public void Grade_returns_the_students_in_that_grade_in_alphabetical_order()
54
36
  {
55
37
  school.Add("Franklin", 5);
56
38
  school.Add("Bradley", 5);
57
39
  school.Add("Jeff", 1);
58
- var expected = new List<string> { "Bradley", "Franklin" };
59
- Assert.That(school.Grade(5), Is.EqualTo(expected));
40
+ var expected = new [] { "Bradley", "Franklin" };
41
+ Assert.Equal(expected, school.Grade(5));
60
42
  }
61
43
 
62
- [Ignore("Remove to run test")]
63
- [Test]
44
+ [Fact(Skip = "Remove to run test")]
64
45
  public void Grade_returns_an_empty_list_if_there_are_no_students_in_that_grade()
65
46
  {
66
- Assert.That(school.Grade(1), Is.EqualTo(new List<string>()));
47
+ Assert.Empty(school.Grade(1));
67
48
  }
68
49
 
69
- [Ignore("Remove to run test")]
70
- [Test]
50
+ [Fact(Skip = "Remove to run test")]
71
51
  public void Student_names_in_each_grade_in_roster_are_sorted()
72
52
  {
73
53
  school.Add("Jennifer", 4);
74
54
  school.Add("Kareem", 6);
75
55
  school.Add("Christopher", 4);
76
56
  school.Add("Kyle", 3);
77
- Assert.That(school.Roster[3], Is.EqualTo(new List<string> { "Kyle" }));
78
- Assert.That(school.Roster[4], Is.EqualTo(new List<string> { "Christopher", "Jennifer" }));
79
- Assert.That(school.Roster[6], Is.EqualTo(new List<string> { "Kareem" }));
57
+ Assert.Equal(new [] { "Kyle" }, school.Roster(3));
58
+ Assert.Equal(new [] { "Christopher", "Jennifer" }, school.Roster(4));
59
+ Assert.Equal(new [] { "Kareem" }, school.Roster(6));
80
60
  }
81
61
  }
@@ -1,4 +1,4 @@
1
- public class Grains
1
+ public static class Grains
2
2
  {
3
3
  public static ulong Square(int n)
4
4
  {
@@ -0,0 +1,14 @@
1
+ using System;
2
+
3
+ public static class Grains
4
+ {
5
+ public static ulong Square(int n)
6
+ {
7
+ throw new NotImplementedException("You need to implement this function.");
8
+ }
9
+
10
+ public static ulong Total()
11
+ {
12
+ throw new NotImplementedException("You need to implement this function.");
13
+ }
14
+ }
@@ -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,60 +1,52 @@
1
- using NUnit.Framework;
1
+ using Xunit;
2
2
 
3
- [TestFixture]
4
3
  public class GrainsTest
5
4
  {
6
- [Test]
5
+ [Fact]
7
6
  public void Test_square_1()
8
7
  {
9
- Assert.That(Grains.Square(1), Is.EqualTo(1));
8
+ Assert.Equal(1ul, Grains.Square(1));
10
9
  }
11
10
 
12
- [Ignore("Remove to run test")]
13
- [Test]
11
+ [Fact(Skip = "Remove to run test")]
14
12
  public void Test_square_2()
15
13
  {
16
- Assert.That(Grains.Square(2), Is.EqualTo(2));
14
+ Assert.Equal(2ul, Grains.Square(2));
17
15
  }
18
16
 
19
- [Ignore("Remove to run test")]
20
- [Test]
17
+ [Fact(Skip = "Remove to run test")]
21
18
  public void Test_square_3()
22
19
  {
23
- Assert.That(Grains.Square(3), Is.EqualTo(4));
20
+ Assert.Equal(4ul, Grains.Square(3));
24
21
  }
25
22
 
26
- [Ignore("Remove to run test")]
27
- [Test]
23
+ [Fact(Skip = "Remove to run test")]
28
24
  public void Test_square_4()
29
25
  {
30
- Assert.That(Grains.Square(4), Is.EqualTo(8));
26
+ Assert.Equal(8ul, Grains.Square(4));
31
27
  }
32
28
 
33
- [Ignore("Remove to run test")]
34
- [Test]
29
+ [Fact(Skip = "Remove to run test")]
35
30
  public void Test_square_16()
36
31
  {
37
- Assert.That(Grains.Square(16), Is.EqualTo(32768));
32
+ Assert.Equal(32768ul, Grains.Square(16));
38
33
  }
39
34
 
40
- [Ignore("Remove to run test")]
41
- [Test]
35
+ [Fact(Skip = "Remove to run test")]
42
36
  public void Test_square_32()
43
37
  {
44
- Assert.That(Grains.Square(32), Is.EqualTo(2147483648));
38
+ Assert.Equal(2147483648ul, Grains.Square(32));
45
39
  }
46
40
 
47
- [Ignore("Remove to run test")]
48
- [Test]
41
+ [Fact(Skip = "Remove to run test")]
49
42
  public void Test_square_64()
50
43
  {
51
- Assert.That(Grains.Square(64), Is.EqualTo(9223372036854775808));
44
+ Assert.Equal(9223372036854775808ul, Grains.Square(64));
52
45
  }
53
46
 
54
- [Ignore("Remove to run test")]
55
- [Test]
47
+ [Fact(Skip = "Remove to run test")]
56
48
  public void Test_total_grains()
57
49
  {
58
- Assert.That(Grains.Total(), Is.EqualTo(18446744073709551615));
50
+ Assert.Equal(18446744073709551615ul, Grains.Total());
59
51
  }
60
52
  }
@@ -0,0 +1,9 @@
1
+ using System;
2
+
3
+ public static class Grep
4
+ {
5
+ public static string Find(string pattern, string flags, string[] files)
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,7 +1,8 @@
1
- using System.IO;
2
- using NUnit.Framework;
1
+ using System;
2
+ using System.IO;
3
+ using Xunit;
3
4
 
4
- public class GrepTest
5
+ public class GrepTest : IDisposable
5
6
  {
6
7
  private const string IliadFileName = "iliad.txt";
7
8
  private const string IliadContents =
@@ -38,18 +39,16 @@ Sing Heav'nly Muse, that on the secret top
38
39
  Of Oreb, or of Sinai, didst inspire
39
40
  That Shepherd, who first taught the chosen Seed
40
41
  ";
41
-
42
- [OneTimeSetUp]
43
- public void SetUp()
42
+
43
+ public GrepTest()
44
44
  {
45
45
  Directory.SetCurrentDirectory(Path.GetTempPath());
46
46
  File.WriteAllText(IliadFileName, IliadContents);
47
47
  File.WriteAllText(MidsummerNightFileName, MidsummerNightContents);
48
48
  File.WriteAllText(ParadiseLostFileName, ParadiseLostContents);
49
49
  }
50
-
51
- [OneTimeTearDown]
52
- public void TearDown()
50
+
51
+ public void Dispose()
53
52
  {
54
53
  Directory.SetCurrentDirectory(Path.GetTempPath());
55
54
  File.Delete(IliadFileName);
@@ -57,7 +56,7 @@ That Shepherd, who first taught the chosen Seed
57
56
  File.Delete(ParadiseLostFileName);
58
57
  }
59
58
 
60
- [Test]
59
+ [Fact]
61
60
  public void One_file_one_match_no_flags()
62
61
  {
63
62
  const string pattern = "Agamemnon";
@@ -67,11 +66,10 @@ That Shepherd, who first taught the chosen Seed
67
66
  const string expected =
68
67
  "Of Atreus, Agamemnon, King of men.\n";
69
68
 
70
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
69
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
71
70
  }
72
71
 
73
- [Ignore("Remove to run test")]
74
- [Test]
72
+ [Fact(Skip = "Remove to run test")]
75
73
  public void One_file_one_match_print_line_numbers_flag()
76
74
  {
77
75
  const string pattern = "Forbidden";
@@ -81,11 +79,10 @@ That Shepherd, who first taught the chosen Seed
81
79
  const string expected =
82
80
  "2:Of that Forbidden Tree, whose mortal tast\n";
83
81
 
84
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
82
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
85
83
  }
86
84
 
87
- [Ignore("Remove to run test")]
88
- [Test]
85
+ [Fact(Skip = "Remove to run test")]
89
86
  public void One_file_one_match_case_insensitive_flag()
90
87
  {
91
88
  const string pattern = "Forbidden";
@@ -95,11 +92,10 @@ That Shepherd, who first taught the chosen Seed
95
92
  const string expected =
96
93
  "Of that Forbidden Tree, whose mortal tast\n";
97
94
 
98
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
95
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
99
96
  }
100
97
 
101
- [Ignore("Remove to run test")]
102
- [Test]
98
+ [Fact(Skip = "Remove to run test")]
103
99
  public void One_file_one_match_print_file_names_flag()
104
100
  {
105
101
  const string pattern = "Forbidden";
@@ -109,11 +105,10 @@ That Shepherd, who first taught the chosen Seed
109
105
  var expected =
110
106
  $"{ParadiseLostFileName}\n";
111
107
 
112
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
108
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
113
109
  }
114
110
 
115
- [Ignore("Remove to run test")]
116
- [Test]
111
+ [Fact(Skip = "Remove to run test")]
117
112
  public void One_file_one_match_match_entire_lines_flag()
118
113
  {
119
114
  const string pattern = "With loss of Eden, till one greater Man";
@@ -123,11 +118,10 @@ That Shepherd, who first taught the chosen Seed
123
118
  const string expected =
124
119
  "With loss of Eden, till one greater Man\n";
125
120
 
126
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
121
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
127
122
  }
128
123
 
129
- [Ignore("Remove to run test")]
130
- [Test]
124
+ [Fact(Skip = "Remove to run test")]
131
125
  public void One_file_one_match_multiple_flags()
132
126
  {
133
127
  const string pattern = "OF ATREUS, Agamemnon, KIng of MEN.";
@@ -136,11 +130,10 @@ That Shepherd, who first taught the chosen Seed
136
130
  const string expected =
137
131
  "9:Of Atreus, Agamemnon, King of men.\n";
138
132
 
139
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
133
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
140
134
  }
141
135
 
142
- [Ignore("Remove to run test")]
143
- [Test]
136
+ [Fact(Skip = "Remove to run test")]
144
137
  public void One_file_several_matches_no_flags()
145
138
  {
146
139
  const string pattern = "may";
@@ -152,11 +145,10 @@ That Shepherd, who first taught the chosen Seed
152
145
  "But I beseech your grace that I may know\n" +
153
146
  "The worst that may befall me in this case,\n";
154
147
 
155
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
148
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
156
149
  }
157
150
 
158
- [Ignore("Remove to run test")]
159
- [Test]
151
+ [Fact(Skip = "Remove to run test")]
160
152
  public void One_file_several_matches_print_line_numbers_flag()
161
153
  {
162
154
  const string pattern = "may";
@@ -168,11 +160,10 @@ That Shepherd, who first taught the chosen Seed
168
160
  "5:But I beseech your grace that I may know\n" +
169
161
  "6:The worst that may befall me in this case,\n";
170
162
 
171
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
163
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
172
164
  }
173
165
 
174
- [Ignore("Remove to run test")]
175
- [Test]
166
+ [Fact(Skip = "Remove to run test")]
176
167
  public void One_file_several_matches_match_entire_lines_flag()
177
168
  {
178
169
  const string pattern = "may";
@@ -181,11 +172,10 @@ That Shepherd, who first taught the chosen Seed
181
172
 
182
173
  const string expected = "";
183
174
 
184
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
175
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
185
176
  }
186
177
 
187
- [Ignore("Remove to run test")]
188
- [Test]
178
+ [Fact(Skip = "Remove to run test")]
189
179
  public void One_file_several_matches_case_insensitive_flag()
190
180
  {
191
181
  const string pattern = "ACHILLES";
@@ -196,11 +186,10 @@ That Shepherd, who first taught the chosen Seed
196
186
  "Achilles sing, O Goddess! Peleus' son;\n" +
197
187
  "The noble Chief Achilles from the son\n";
198
188
 
199
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
189
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
200
190
  }
201
191
 
202
- [Ignore("Remove to run test")]
203
- [Test]
192
+ [Fact(Skip = "Remove to run test")]
204
193
  public void One_file_several_matches_inverted_flag()
205
194
  {
206
195
  const string pattern = "Of";
@@ -214,26 +203,26 @@ That Shepherd, who first taught the chosen Seed
214
203
  "Sing Heav'nly Muse, that on the secret top\n" +
215
204
  "That Shepherd, who first taught the chosen Seed\n";
216
205
 
217
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
206
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
218
207
  }
219
208
 
220
- [TestCase("", Ignore = "Remove to run test case")]
221
- [TestCase("-n", Ignore = "Remove to run test case")]
222
- [TestCase("-l", Ignore = "Remove to run test case")]
223
- [TestCase("-x", Ignore = "Remove to run test case")]
224
- [TestCase("-i", Ignore = "Remove to run test case")]
225
- [TestCase("-n -l -x -i", Ignore = "Remove to run test case")]
209
+ [Theory(Skip = "Remove to run test")]
210
+ [InlineData("")]
211
+ [InlineData("-n")]
212
+ [InlineData("-l")]
213
+ [InlineData("-x")]
214
+ [InlineData("-i")]
215
+ [InlineData("-n -l -x -i")]
226
216
  public void One_file_no_matches_various_flags(string flags)
227
217
  {
228
218
  const string pattern = "Gandalf";
229
219
  var files = new[] { IliadFileName };
230
220
  const string expected = "";
231
221
 
232
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
222
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
233
223
  }
234
224
 
235
- [Ignore("Remove to run test")]
236
- [Test]
225
+ [Fact(Skip = "Remove to run test")]
237
226
  public void Multiple_files_one_match_no_flags()
238
227
  {
239
228
  const string pattern = "Agamemnon";
@@ -243,11 +232,10 @@ That Shepherd, who first taught the chosen Seed
243
232
  var expected =
244
233
  $"{IliadFileName}:Of Atreus, Agamemnon, King of men.\n";
245
234
 
246
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
235
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
247
236
  }
248
237
 
249
- [Ignore("Remove to run test")]
250
- [Test]
238
+ [Fact(Skip = "Remove to run test")]
251
239
  public void Multiple_files_several_matches_no_flags()
252
240
  {
253
241
  const string pattern = "may";
@@ -259,11 +247,10 @@ That Shepherd, who first taught the chosen Seed
259
247
  $"{MidsummerNightFileName}:But I beseech your grace that I may know\n" +
260
248
  $"{MidsummerNightFileName}:The worst that may befall me in this case,\n";
261
249
 
262
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
250
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
263
251
  }
264
252
 
265
- [Ignore("Remove to run test")]
266
- [Test]
253
+ [Fact(Skip = "Remove to run test")]
267
254
  public void Multiple_files_several_matches_print_line_numbers_flag()
268
255
  {
269
256
  const string pattern = "that";
@@ -276,11 +263,10 @@ That Shepherd, who first taught the chosen Seed
276
263
  $"{ParadiseLostFileName}:2:Of that Forbidden Tree, whose mortal tast\n" +
277
264
  $"{ParadiseLostFileName}:6:Sing Heav'nly Muse, that on the secret top\n";
278
265
 
279
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
266
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
280
267
  }
281
268
 
282
- [Ignore("Remove to run test")]
283
- [Test]
269
+ [Fact(Skip = "Remove to run test")]
284
270
  public void Multiple_files_several_matches_print_file_names_flag()
285
271
  {
286
272
  const string pattern = "who";
@@ -291,11 +277,10 @@ That Shepherd, who first taught the chosen Seed
291
277
  $"{IliadFileName}\n" +
292
278
  $"{ParadiseLostFileName}\n";
293
279
 
294
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
280
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
295
281
  }
296
282
 
297
- [Ignore("Remove to run test")]
298
- [Test]
283
+ [Fact(Skip = "Remove to run test")]
299
284
  public void Multiple_files_several_matches_case_insensitive_flag()
300
285
  {
301
286
  const string pattern = "TO";
@@ -314,11 +299,10 @@ That Shepherd, who first taught the chosen Seed
314
299
  $"{ParadiseLostFileName}:Restore us, and regain the blissful Seat,\n" +
315
300
  $"{ParadiseLostFileName}:Sing Heav'nly Muse, that on the secret top\n";
316
301
 
317
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
302
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
318
303
  }
319
304
 
320
- [Ignore("Remove to run test")]
321
- [Test]
305
+ [Fact(Skip = "Remove to run test")]
322
306
  public void Multiple_files_several_matches_inverted_flag()
323
307
  {
324
308
  const string pattern = "a";
@@ -330,11 +314,10 @@ That Shepherd, who first taught the chosen Seed
330
314
  $"{IliadFileName}:The noble Chief Achilles from the son\n" +
331
315
  $"{MidsummerNightFileName}:If I refuse to wed Demetrius.\n";
332
316
 
333
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
317
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
334
318
  }
335
319
 
336
- [Ignore("Remove to run test")]
337
- [Test]
320
+ [Fact(Skip = "Remove to run test")]
338
321
  public void Multiple_files_one_match_match_entire_lines_flag()
339
322
  {
340
323
  const string pattern = "But I beseech your grace that I may know";
@@ -344,11 +327,10 @@ That Shepherd, who first taught the chosen Seed
344
327
  var expected =
345
328
  $"{MidsummerNightFileName}:But I beseech your grace that I may know\n";
346
329
 
347
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
330
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
348
331
  }
349
332
 
350
- [Ignore("Remove to run test")]
351
- [Test]
333
+ [Fact(Skip = "Remove to run test")]
352
334
  public void Multiple_files_one_match_multiple_flags()
353
335
  {
354
336
  const string pattern = "WITH LOSS OF EDEN, TILL ONE GREATER MAN";
@@ -357,15 +339,16 @@ That Shepherd, who first taught the chosen Seed
357
339
  var expected =
358
340
  $"{ParadiseLostFileName}:4:With loss of Eden, till one greater Man\n";
359
341
 
360
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
342
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
361
343
  }
362
344
 
363
- [TestCase("", Ignore = "Remove to run test case")]
364
- [TestCase("-n", Ignore = "Remove to run test case")]
365
- [TestCase("-l", Ignore = "Remove to run test case")]
366
- [TestCase("-x", Ignore = "Remove to run test case")]
367
- [TestCase("-i", Ignore = "Remove to run test case")]
368
- [TestCase("-n -l -x -i", Ignore = "Remove to run test case")]
345
+ [Theory(Skip = "Remove to run test")]
346
+ [InlineData("")]
347
+ [InlineData("-n")]
348
+ [InlineData("-l")]
349
+ [InlineData("-x")]
350
+ [InlineData("-i")]
351
+ [InlineData("-n -l -x -i")]
369
352
  public void Multiple_files_no_matches_various_flags(string flags)
370
353
  {
371
354
  const string pattern = "Frodo";
@@ -373,6 +356,6 @@ That Shepherd, who first taught the chosen Seed
373
356
 
374
357
  const string expected = "";
375
358
 
376
- Assert.That(Grep.Find(pattern, flags, files), Is.EqualTo(expected));
359
+ Assert.Equal(expected, Grep.Find(pattern, flags, files));
377
360
  }
378
361
  }