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,16 +1,26 @@
1
1
  machine:
2
2
  environment:
3
3
  TERM: xterm-256color
4
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
5
+ DOTNET_CLI_TELEMETRY_OPTOUT: 1
4
6
  dependencies:
5
7
  pre:
8
+ - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
6
9
  - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
7
10
  - echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
8
11
  - sudo apt-get update
9
12
  - sudo apt-get install mono-complete
13
+ - sudo apt-get install gettext
14
+ - sudo apt-get install libcurl4-openssl-dev
15
+ - sudo apt-get install libicu-dev
16
+ - sudo apt-get install libssl-dev
17
+ - sudo apt-get install libunwind8
18
+ - sudo apt-get install zlib1g
19
+ - sudo apt-get install libstdc++6
20
+ - curl https://download.microsoft.com/download/B/4/6/B4678511-01F4-4F97-902B-0E58A985932A/dotnet-dev-debian-x64.1.0.0-rc4-004771.tar.gz -o /tmp/dotnet.tar.gz
21
+ - sudo mkdir -p /opt/dotnet
22
+ - sudo tar zxf /tmp/dotnet.tar.gz -C /opt/dotnet
23
+ - sudo ln -s /opt/dotnet/dotnet /usr/local/bin
10
24
  test:
11
25
  override:
12
- - ./build.sh
13
- post:
14
- - mkdir -p $CIRCLE_TEST_REPORTS/junit/
15
- - sed -i '1 s/^\xef\xbb\xbf//' .*/junit-results.xml
16
- - find . -type f -regex ".*/junit-results.xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
26
+ - ./build.sh
@@ -1,185 +1,20 @@
1
- ## Installing C#
1
+ ### Installing .NET Core
2
2
 
3
- * [Windows](#windows)
4
- * [Mac](#mac)
5
- * [Linux](#linux)
6
-
7
- ### [Windows](#windows)
8
- There are a couple of different ways to get started using C#. The main way is to
9
- install Visual Studio, the IDE for C# and related projects.
10
-
11
- If you don't want to use the IDE, files can be compiled via command line using the
12
- compiler provided by the .NET framework.
13
-
14
- #### With Visual Studio
15
-
16
- Install [Visual Studio Express 2013 for Windows Desktop](http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop). This will include the IDE and compiler for C#.
17
-
18
- You can either start by creating your own project for working with the Exercism problems or you can download a Visual Studio solution that is already set up.
19
-
20
- #### Exercism.io Visual Studio Template
21
-
22
- This is a Visual Studio template that comes pre-configured to work on the problems in as many languages as Visual Studio supports.
23
-
24
- ![Solution Explorer](http://x.exercism.io/v3/tracks/csharp/docs/img/SolutionExplorer.png)
25
-
26
- 1. Download the [Exercism.io Visual Studio Template](https://github.com/rprouse/Exercism.VisualStudio) from GitHub by clicking the Download Zip button on the page.
27
- 2. Unzip the template into your exercises directory, for example `C:\src\exercises`
28
- 2. Install the [Exercism CLI](http://exercism.io/cli)
29
- 3. Open a command prompt to your exercise directory
30
- 4. Add your API key to exercism `exercism configure --key=YOUR_API_KEY`
31
- 5. Configure your source directory in exercism `exercism configure --dir=C:\src\exercises`
32
- 6. [Fetch your first exercise](http://exercism.io/how-it-works/newbie) `exercism fetch csharp`
33
- 7. Open the Exercism solution in Visual Studio
34
- 8. Expand the Exercism.csharp project
35
- 9. Click on **Show All Files** in Solution Explorer (See below)
36
- 10. The exercise you just fetched will appear greyed out. Right click on the folder and **Include In Project**
37
- 11. Get coding...
38
-
39
- ![Add files](http://x.exercism.io/v3/tracks/csharp/docs/img/AddFiles.png)
40
-
41
- The NUnit NuGet package is included in the project, so you will not need to install it.
42
-
43
- If you have a paid version of Visual Studio install the [NUnit Visual Studio Test Adapter](https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d). This will allow you to run the tests from within Visual Studio. If you have ReSharper installed, you can also [run the tests using ReSharper](https://www.jetbrains.com/resharper/features/unit_testing.html).
44
-
45
- ![Test Explorer](http://x.exercism.io/v3/tracks/csharp/docs/img/TestExplorer.png)
46
-
47
- If you are using Visual Studio Express, install [NUnit 3.x](http://www.nunit.org/) and run the tests from the command line (see below).
48
-
49
- #### Create a New Visual Studio Project
50
-
51
- Once installed and started, click on "Create New Project" (alternatively, you can go to File->New->New Project).
52
-
53
- ![New Project](http://x.exercism.io/v3/tracks/csharp/docs/img/newProject.png)
54
-
55
- Choose what language and project type (Visual C# and Class Library). Also name your project to whatever you'd like.
56
-
57
- ![Create Project](http://x.exercism.io/v3/tracks/csharp/docs/img/createNewProject.png)
58
-
59
- Once created, feel free to drag and drop the C# Exercism folders into the project.
60
-
61
- ![Drag and Drop Folders](http://x.exercism.io/v3/tracks/csharp/docs/img/dragDropFolders.png)
62
-
63
- In order to compile, get the [NUnit](http://nunit.org/) assembly referenced for the unit tests. This can be done via [NuGet](http://www.nuget.org/) - a package manager for Visual Studio. The best packages is to get the base [NUnit]() and the [NUnit.Console](https://www.nuget.org/packages/NUnit.Console/)
64
- package since it includes the assemblies needed and a GUI test runner.
65
-
66
- ![Nuget](http://x.exercism.io/v3/tracks/csharp/docs/img/nugetMenu.png)
67
-
68
- Two options to use Nuget - the NuGet manager or through the Package Manager Console.
69
-
70
- The manager is the easiest way to get started.
71
-
72
- ![Nuget Manager](http://x.exercism.io/v3/tracks/csharp/docs/img/nugetManageNunitRunner.png)
73
-
74
- The project should now be able to compile.
75
-
76
- The next piece required is the NUnit Test Adapter for Visual Studio. The major version of the Test Adapter must match the major version of the NUnit Framework that you installed above, or the Visual Studio Test Explorer window will not detect your unit tests.
77
- - [Adapter Version 3 for NUnit 3.x](https://visualstudiogallery.msdn.microsoft.com/0da0f6bd-9bb6-4ae3-87a8-537788622f2d)
78
- - [Adapter Version 2 for NUnit 2.x](https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d)
79
-
80
- To start implementing the exercise, in Visual Studio, right click on where you want the file to go to and go to `Add` -> `Class`. Name it what you'd like.
81
-
82
- ![New Item](http://x.exercism.io/v3/tracks/csharp/docs/img/addNewClass.png)
83
-
84
- Now you can start coding!
85
-
86
- #### With the command line compiler
87
- The .cs files can also be compiled without Visual Studio. Get the latest version of
88
- [.NET installed](http://msdn.microsoft.com/en-us/library/5a4x27ek(v=vs.110).aspx) and there will be an executable called csc.exe.
89
-
90
- The compiler executable is usually located in the Microsoft.NET\Framework\Version folder under the Windows directory.
91
-
92
- Refer to this [MSDN article](http://msdn.microsoft.com/en-us/library/78f4aasd.aspx) for more information on the command line compiler.
93
-
94
- ### [Mac](#mac)
95
-
96
- Install [Xamarin Studio](http://xamarin.com/download).
97
-
98
- While Xamarin is most known for creating iOS and Android applications, it's still a perfect IDE to create C# console
99
- or library projects which is all that's needed for Exercism.
100
-
101
- Once installed and running, click on new solution and you'll find the C# library project to select.
102
-
103
- ![Xamarin New Project](http://x.exercism.io/v3/tracks/csharp/docs/img/xamarin-csharp.jpg)
104
-
105
- ### [Linux](#linux)
106
-
107
- .NET Core is available for Linux. Follow the [official installation guide](https://www.microsoft.com/net/core#linuxubuntu) to install the .NET Core development tools.
108
-
109
- After installing .NET Core, fetch the first exercise of the csharp-track:
110
-
111
- ```
112
- exercism fetch csharp
113
- ```
114
-
115
- Move into the exercise directory:
116
-
117
- ```
118
- cd ~/exercism/csharp/hello-world
119
- ```
120
-
121
- Initialize a new dotnet project
122
-
123
- ```
124
- dotnet new
125
- ```
126
-
127
- Several new files are created, among them project.json. We have to add nunit as a dependency in order to run the tests provided in the exercise.
128
-
129
- Add the following lines to the dependency block:
3
+ The C# track is built on top of the [.NET Core](https://www.microsoft.com/net/core/platform) platform, which runs on Windows, Linux and macOS. To build .NET Core projects, you can use the .NET Core Command Line Interface (CLI). This CLI is part of the .NET Core SDK, which you can install by following the [installation instructions](https://www.microsoft.com/net/download/core). After completing the installation, you can verify if the CLI was installed succesfully by running this command in a terminal:
130
4
 
131
- ```
132
- "dependencies": {
133
- "nunit": "3.6.0",
134
- "dotnet-test-nunit": "3.4.0-*"
135
- }
5
+ ```bash
6
+ dotnet --version
136
7
  ```
137
8
 
138
- We also have to specify the testrunner, add this line below the dependency block:
9
+ It the output is a version greater than or equal to `1.0.0`, the .NET Core SDK has been installed succesfully.
139
10
 
140
- ```
141
- "testRunner":"nunit"
142
- ```
143
-
144
- The complete **project.json** file should look something like this:
11
+ ### Using an IDE
145
12
 
146
- ```
147
- {
148
- "version": "1.0.0-*",
149
- "buildOptions": {
150
- "debugType": "portable",
151
- "emitEntryPoint": true
152
- },
153
- "dependencies": {
154
- "nunit": "3.6.0",
155
- "dotnet-test-nunit": "3.4.0-*"
156
- },
157
- "testRunner":"nunit",
158
- "frameworks": {
159
- "netcoreapp1.1": {
160
- "dependencies": {
161
- "Microsoft.NETCore.App": {
162
- "type": "platform",
163
- "version": "1.1.0"
164
- }
165
- },
166
- "imports": "dnxcore50"
167
- }
168
- }
169
- }
170
- ```
171
-
172
- Then we can restore the packages using:
173
-
174
- ```
175
- dotnet restore
176
- ```
177
-
178
- Compile the project and run the tests with this:
179
-
180
- ```
181
- dotnet test
182
- ```
13
+ If you want a more full-featured editing experience, you probably want to to use an IDE. These are the most popular IDE's that support building .NET Core projects:
183
14
 
15
+ * [Visual Studio 2017](https://www.visualstudio.com/downloads/)
16
+ * [Visual Studio Code](https://code.visualstudio.com/download) with the [C# extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp)
17
+ * [Visual Studio for Mac](https://www.visualstudio.com/vs/visual-studio-mac/) (still in beta)
18
+ * [Project Rider](https://www.jetbrains.com/rider/download/) (still in EAP)
184
19
 
185
- [Mono Develop](http://www.mono-project.com/Mono_For_Linux_Developers) is available for Linux.
20
+ Note: as the .NET Core project format differs significantly from earlier versions, older IDE's (like Visual Studio 2015 and Xamarin Studio) are not supported.
@@ -1,50 +1,33 @@
1
- ### Windows
2
- All tests have been ignored except the first one for you to work on. To continue, just remove the ```[Ignore]``` attribute on the test to start working on it.
1
+ ## Running Tests
3
2
 
4
- Make sure [NUnit](http://nunit.org/?p=download) version 3.x is installed, if not already installed from the setup above.
3
+ To run the tests, you first need to restore the project's dependencies using the following command:
5
4
 
6
- This installation should include the NUnit-Gui executable. Run this, and after compiling, open the assembly from the Gui and you are able to run the tests.
5
+ ```bash
6
+ dotnet restore
7
+ ```
7
8
 
8
- **Note:** You may need to include the nunit-framework.dll in the same directory as the source code you're compiling if you get an error saying it can't find the ```nunit.framework.dll```.
9
+ You can then run the tests by executing the following command:
9
10
 
10
- If you installed the NUnit runner through NuGet, the runner will be located in the ```\packages\NUnit.Console(version number)\tools``` folder where your project is.
11
+ ```bash
12
+ dotnet test
13
+ ```
11
14
 
12
- If you installed NUnit manually the runner will be in the ```Program Files (x86)\NUnit(version number)\bin``` folder.
15
+ ## Solving the exercise
13
16
 
14
- ![NUnit Runner](http://x.exercism.io/v3/tracks/csharp/docs/img/nUnitRunner.png)
17
+ Solving an exercise means making all its tests pass. By default, only one test (the first one) is executed when you run the tests. This is intentional, as it allows you to focus on just making that one test pass. Once it passes, you can enable the next test by removing `Skip = "Remove to run test"` from the test's `[Fact]` or `[Theory]` attribute. When all tests have been enabled and your implementation makes them all pass, you'll have solved the exercise!
15
18
 
16
- Once you have been able to compile the code it will create a DLL in the ```\bin\Debug``` folder of your project. In the NUnit runner, select "Open Project" and select the DLL that was created from compiling. This will load all the tests and allow you to run them.
19
+ To help you get started, each exercise comes with a stub implementation file. You can use this file as a starting point for building your solution. Feel free to remove or change this file if you think it is the right thing to do.
17
20
 
18
- ![NUnit Runner Execute Tests](http://x.exercism.io/v3/tracks/csharp/docs/img/nUnitExecuteTests.png)
21
+ ## Using packages
19
22
 
20
- The NUnit runner will automatically reload the DLL if it has been updated.
23
+ You should be able to solve most exercises without using any external packages. However, for the exercises where you do want to use an external package, you can add it to your project by running the following command:
21
24
 
22
- ##### Visual Studio Integration
25
+ ```bash
26
+ dotnet add package <package-name>
27
+ ```
23
28
 
24
- Another alternative to running the tests with NUnit-Gui is to run them directly in Visual Studio, which is very convenient if that's your IDE of choice. While the support is natively built in to Visual Studio 2015, for older versions you'll need to install the [NUnit Test Adapter](http://www.nunit.org/index.php?p=vsTestAdapter&r=2.6.2).
29
+ Once the package has been added, you need to update the project's dependencies again to use it in your project:
25
30
 
26
- ### Mac
27
- Xamarin Studio also ships with NUnit. To set the tests up you will have to add an NUnit library project to your solution, name it correctly and set a reference to your solution.
28
-
29
- This is the example setup for the "leap" exercise. We assume you created a solution called `LeapCalculator`.
30
-
31
- Right-click the solution and choose *Add* -> *Add New Project*.
32
- ![Add Xamarin NUnit Test](http://x.exercism.io/v3/tracks/csharp/docs/img/xamarin-add-new-project.png)
33
-
34
- Then from the new project dialog, select an NUnit Library Project.
35
- ![Xamarin NUnit](http://x.exercism.io/v3/tracks/csharp/docs/img/xamarin-nunit.jpg)
36
-
37
- For the project name append `.Tests` to the name of your solution. So in our case `LeapCalculator.Tests`
38
- ![Xamarin NUnit](http://x.exercism.io/v3/tracks/csharp/docs/img/xamarin-naming.png)
39
-
40
- Set a reference to your solution with right-click on references in your test project. Then choose the Projects tab and tick the box to your solution and click `ok`.
41
-
42
- ![Xamarin NUnit](http://x.exercism.io/v3/tracks/csharp/docs/img/xamarin-edit-reference.png)
43
-
44
- ![Xamarin NUnit](http://x.exercism.io/v3/tracks/csharp/docs/img/xamarin-add-reference.png)
45
-
46
- Add some of the tests from the exercise or write your own.
47
-
48
- To run the tests open the `Unit Tests` pad within Xamarin (View -> Pads -> Unit Tests) and click `Run All`.
49
-
50
- ![Xamarin NUnit](http://x.exercism.io/v3/tracks/csharp/docs/img/xamarin-tests.png)
31
+ ```bash
32
+ dotnet restore
33
+ ```
@@ -0,0 +1,10 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+
4
+ public static class AccumulateExtensions
5
+ {
6
+ public static IEnumerable<U> Accumulate<T, U>(this IEnumerable<T> collection, Func<T, U> func)
7
+ {
8
+ throw new NotImplementedException("You need to implement this function.");
9
+ }
10
+ }
@@ -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,38 +1,32 @@
1
1
  using System;
2
2
  using System.Collections.Generic;
3
3
  using System.Linq;
4
- using NUnit.Framework;
4
+ using Xunit;
5
5
 
6
- [TestFixture]
7
6
  public class AccumulateTest
8
7
  {
9
- [Test]
8
+ [Fact]
10
9
  public void Empty_accumulation_produces_empty_accumulation()
11
10
  {
12
- Assert.That(new int[0].Accumulate(x => x * x), Is.EqualTo(new int[0]));
11
+ Assert.Equal(new int[0], new int[0].Accumulate(x => x * x));
13
12
  }
14
13
 
15
- [Ignore("Remove to run test")]
16
- [Test]
14
+ [Fact(Skip = "Remove to run test")]
17
15
  public void Accumulate_squares()
18
16
  {
19
- Assert.That(new[] { 1, 2, 3 }.Accumulate(x => x * x), Is.EqualTo(new[] { 1, 4, 9 }));
17
+ Assert.Equal(new[] { 1, 4, 9 }, new[] { 1, 2, 3 }.Accumulate(x => x * x));
20
18
  }
21
19
 
22
- [Ignore("Remove to run test")]
23
- [Test]
20
+ [Fact(Skip = "Remove to run test")]
24
21
  public void Accumulate_upcases()
25
22
  {
26
- Assert.That(new List<string> { "hello", "world" }.Accumulate(x => x.ToUpper()),
27
- Is.EqualTo(new List<string> { "HELLO", "WORLD" }));
23
+ Assert.Equal(new List<string> { "HELLO", "WORLD" }, new List<string> { "hello", "world" }.Accumulate(x => x.ToUpper()));
28
24
  }
29
25
 
30
- [Ignore("Remove to run test")]
31
- [Test]
26
+ [Fact(Skip = "Remove to run test")]
32
27
  public void Accumulate_reversed_strings()
33
28
  {
34
- Assert.That("the quick brown fox etc".Split(' ').Accumulate(Reverse),
35
- Is.EqualTo("eht kciuq nworb xof cte".Split(' ')));
29
+ Assert.Equal("eht kciuq nworb xof cte".Split(' '), "the quick brown fox etc".Split(' ').Accumulate(Reverse));
36
30
  }
37
31
 
38
32
  private static string Reverse(string value)
@@ -42,33 +36,28 @@ public class AccumulateTest
42
36
  return new string(array);
43
37
  }
44
38
 
45
- [Ignore("Remove to run test")]
46
- [Test]
39
+ [Fact(Skip = "Remove to run test")]
47
40
  public void Accumulate_within_accumulate()
48
41
  {
49
42
  var actual = new[] { "a", "b", "c" }.Accumulate(c =>
50
43
  string.Join(" ", new[] { "1", "2", "3" }.Accumulate(d => c + d)));
51
- Assert.That(actual, Is.EqualTo(new[] { "a1 a2 a3", "b1 b2 b3", "c1 c2 c3" }));
44
+ Assert.Equal(new[] { "a1 a2 a3", "b1 b2 b3", "c1 c2 c3" }, actual);
52
45
  }
53
46
 
54
- [Ignore("Remove to run test")]
55
- [Test]
47
+ [Fact(Skip = "Remove to run test")]
56
48
  public void Accumulate_is_lazy()
57
49
  {
58
50
  var counter = 0;
59
51
  var accumulation = new[] { 1, 2, 3 }.Accumulate(x => x * counter++);
60
52
 
61
- Assert.That(counter, Is.EqualTo(0));
53
+ Assert.Equal(0, counter);
62
54
  accumulation.ToList();
63
- Assert.That(counter, Is.EqualTo(3));
55
+ Assert.Equal(3, counter);
64
56
  }
65
57
 
66
- [Ignore("Remove to run test")]
67
- [Test]
58
+ [Fact(Skip = "Remove to run test")]
68
59
  public void Accumulate_allows_different_return_type()
69
60
  {
70
- Assert.That(
71
- new[] { 1, 2, 3 }.Accumulate(x => x.ToString()),
72
- Is.EqualTo(new[] { "1", "2", "3" }));
61
+ Assert.Equal(new[] { "1", "2", "3" }, new[] { 1, 2, 3 }.Accumulate(x => x.ToString()));
73
62
  }
74
63
  }
@@ -0,0 +1,9 @@
1
+ using System;
2
+
3
+ public static class Acronym
4
+ {
5
+ public static string Abbreviate(string phrase)
6
+ {
7
+ throw new NotImplementedException("Please 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>