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.
- checksums.yaml +4 -4
- data/common/exercises/robot-simulator/canonical-data.json +238 -214
- data/common/exercises/secret-handshake/canonical-data.json +80 -64
- data/lib/trackler/version.rb +1 -1
- data/tracks/csharp/.gitignore +6 -1
- data/tracks/csharp/.travis.yml +26 -3
- data/tracks/csharp/Zipper.cs +137 -0
- data/tracks/csharp/appveyor.yml +6 -1
- data/tracks/csharp/build.fsx +59 -47
- data/tracks/csharp/circle.yml +15 -5
- data/tracks/csharp/docs/INSTALLATION.md +12 -177
- data/tracks/csharp/docs/TESTS.md +21 -38
- data/tracks/csharp/exercises/accumulate/Accumulate.cs +10 -0
- data/tracks/csharp/exercises/accumulate/Accumulate.csproj +18 -0
- data/tracks/csharp/exercises/accumulate/AccumulateTest.cs +16 -27
- data/tracks/csharp/exercises/acronym/Acronym.cs +9 -0
- data/tracks/csharp/exercises/acronym/Acronym.csproj +18 -0
- data/tracks/csharp/exercises/acronym/AcronymTest.cs +17 -20
- data/tracks/csharp/exercises/acronym/Example.cs +11 -14
- data/tracks/csharp/exercises/all-your-base/AllYourBase.cs +9 -0
- data/tracks/csharp/exercises/all-your-base/AllYourBase.csproj +18 -0
- data/tracks/csharp/exercises/all-your-base/AllYourBaseTest.cs +30 -51
- data/tracks/csharp/exercises/allergies/Allergies.cs +19 -0
- data/tracks/csharp/exercises/allergies/Allergies.csproj +18 -0
- data/tracks/csharp/exercises/allergies/AllergiesTest.cs +28 -40
- data/tracks/csharp/exercises/alphametics/Alphametics.cs +10 -0
- data/tracks/csharp/exercises/alphametics/Alphametics.csproj +19 -0
- data/tracks/csharp/exercises/alphametics/AlphameticsTest.cs +18 -24
- data/tracks/csharp/exercises/alphametics/Example.cs +6 -1
- data/tracks/csharp/exercises/anagram/Anagram.cs +14 -0
- data/tracks/csharp/exercises/anagram/Anagram.csproj +18 -0
- data/tracks/csharp/exercises/anagram/AnagramTest.cs +19 -28
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipher.cs +9 -0
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipher.csproj +18 -0
- data/tracks/csharp/exercises/atbash-cipher/AtbashTest.cs +11 -11
- data/tracks/csharp/exercises/atbash-cipher/Example.cs +1 -1
- data/tracks/csharp/exercises/bank-account/BankAccount.cs +27 -0
- data/tracks/csharp/exercises/bank-account/BankAccount.csproj +18 -0
- data/tracks/csharp/exercises/bank-account/BankAccountTest.cs +14 -18
- data/tracks/csharp/exercises/beer-song/BeerSong.cs +14 -0
- data/tracks/csharp/exercises/beer-song/BeerSong.csproj +18 -0
- data/tracks/csharp/exercises/beer-song/BeerTest.cs +13 -11
- data/tracks/csharp/exercises/binary-search-tree/BinarySearchTree.cs +53 -0
- data/tracks/csharp/exercises/binary-search-tree/BinarySearchTree.csproj +18 -0
- data/tracks/csharp/exercises/binary-search-tree/BinarySearchTreeTest.cs +28 -36
- data/tracks/csharp/exercises/binary-search/BinarySearch.cs +9 -0
- data/tracks/csharp/exercises/binary-search/BinarySearch.csproj +18 -0
- data/tracks/csharp/exercises/binary-search/BinarySearchTest.cs +19 -28
- data/tracks/csharp/exercises/bob/Bob.cs +9 -0
- data/tracks/csharp/exercises/bob/Bob.csproj +18 -0
- data/tracks/csharp/exercises/bob/BobTest.cs +37 -55
- data/tracks/csharp/exercises/bob/Example.cs +2 -3
- data/tracks/csharp/exercises/book-store/BookStore.cs +10 -0
- data/tracks/csharp/exercises/book-store/BookStore.csproj +18 -0
- data/tracks/csharp/exercises/book-store/BookStoreTest.cs +25 -37
- data/tracks/csharp/exercises/book-store/Example.cs +1 -1
- data/tracks/csharp/exercises/bowling/Bowling.cs +14 -0
- data/tracks/csharp/exercises/bowling/Bowling.csproj +18 -0
- data/tracks/csharp/exercises/bowling/BowlingTest.cs +49 -72
- data/tracks/csharp/exercises/bracket-push/BracketPush.cs +9 -0
- data/tracks/csharp/exercises/bracket-push/BracketPush.csproj +18 -0
- data/tracks/csharp/exercises/bracket-push/BracketPushTest.cs +25 -36
- data/tracks/csharp/exercises/change/Change.cs +9 -0
- data/tracks/csharp/exercises/change/Change.csproj +18 -0
- data/tracks/csharp/exercises/change/ChangeTest.cs +15 -22
- data/tracks/csharp/exercises/circular-buffer/CircularBuffer.cs +29 -0
- data/tracks/csharp/exercises/circular-buffer/CircularBuffer.csproj +18 -0
- data/tracks/csharp/exercises/circular-buffer/CircularBufferTest.cs +36 -43
- data/tracks/csharp/exercises/clock/Clock.cs +24 -0
- data/tracks/csharp/exercises/clock/Clock.csproj +18 -0
- data/tracks/csharp/exercises/clock/ClockTest.cs +35 -48
- data/tracks/csharp/exercises/connect/Connect.cs +21 -0
- data/tracks/csharp/exercises/connect/Connect.csproj +18 -0
- data/tracks/csharp/exercises/connect/ConnectTest.cs +17 -24
- data/tracks/csharp/exercises/connect/Example.cs +36 -37
- data/tracks/csharp/exercises/crypto-square/CryptoSquare.cs +41 -0
- data/tracks/csharp/exercises/crypto-square/CryptoSquare.csproj +18 -0
- data/tracks/csharp/exercises/crypto-square/CryptoSquareTest.cs +33 -49
- data/tracks/csharp/exercises/custom-set/CustomSet.cs +88 -0
- data/tracks/csharp/exercises/custom-set/CustomSet.csproj +18 -0
- data/tracks/csharp/exercises/custom-set/CustomSetTest.cs +75 -111
- data/tracks/csharp/exercises/custom-set/Example.cs +20 -2
- data/tracks/csharp/exercises/diamond/Diamond.cs +9 -0
- data/tracks/csharp/exercises/diamond/Diamond.csproj +18 -0
- data/tracks/csharp/exercises/diamond/DiamondTest.cs +35 -26
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.cs +19 -0
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.csproj +18 -0
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs +21 -38
- data/tracks/csharp/exercises/difference-of-squares/Example.cs +5 -17
- data/tracks/csharp/exercises/diffie-hellman/DiffieHellman.cs +20 -0
- data/tracks/csharp/exercises/diffie-hellman/DiffieHellman.csproj +18 -0
- data/tracks/csharp/exercises/diffie-hellman/DiffieHellmanTest.cs +16 -18
- data/tracks/csharp/exercises/dominoes/Dominoes.cs +10 -0
- data/tracks/csharp/exercises/dominoes/Dominoes.csproj +18 -0
- data/tracks/csharp/exercises/dominoes/DominoesTest.cs +35 -46
- data/tracks/csharp/exercises/dot-dsl/DotDsl.cs +15 -0
- data/tracks/csharp/exercises/dot-dsl/DotDsl.csproj +18 -0
- data/tracks/csharp/exercises/dot-dsl/DotDslTest.cs +40 -30
- data/tracks/csharp/exercises/error-handling/ErrorHandling.cs +24 -0
- data/tracks/csharp/exercises/error-handling/ErrorHandling.csproj +18 -0
- data/tracks/csharp/exercises/error-handling/ErrorHandlingTest.cs +12 -16
- data/tracks/csharp/exercises/etl/ETLTest.cs +9 -13
- data/tracks/csharp/exercises/etl/Etl.cs +10 -0
- data/tracks/csharp/exercises/etl/Etl.csproj +18 -0
- data/tracks/csharp/exercises/etl/Example.cs +1 -1
- data/tracks/csharp/exercises/exercises.sln +1475 -0
- data/tracks/csharp/exercises/flatten-array/FlattenArray.cs +10 -0
- data/tracks/csharp/exercises/flatten-array/FlattenArray.csproj +18 -0
- data/tracks/csharp/exercises/flatten-array/FlattenArrayTest.cs +18 -22
- data/tracks/csharp/exercises/food-chain/FoodChain.cs +14 -0
- data/tracks/csharp/exercises/food-chain/FoodChain.csproj +18 -0
- data/tracks/csharp/exercises/food-chain/FoodChainTest.cs +11 -15
- data/tracks/csharp/exercises/forth/Forth.cs +27 -0
- data/tracks/csharp/exercises/forth/Forth.csproj +19 -0
- data/tracks/csharp/exercises/forth/ForthTest.cs +42 -56
- data/tracks/csharp/exercises/gigasecond/Example.cs +1 -1
- data/tracks/csharp/exercises/gigasecond/Gigasecond.cs +9 -0
- data/tracks/csharp/exercises/gigasecond/Gigasecond.csproj +18 -0
- data/tracks/csharp/exercises/gigasecond/GigasecondTest.cs +7 -10
- data/tracks/csharp/exercises/go-counting/Example.cs +44 -44
- data/tracks/csharp/exercises/go-counting/GoCounting.cs +27 -0
- data/tracks/csharp/exercises/go-counting/GoCounting.csproj +18 -0
- data/tracks/csharp/exercises/go-counting/GoCountingTest.cs +53 -41
- data/tracks/csharp/exercises/grade-school/Example.cs +12 -14
- data/tracks/csharp/exercises/grade-school/GradeSchool.cs +20 -0
- data/tracks/csharp/exercises/grade-school/GradeSchool.csproj +18 -0
- data/tracks/csharp/exercises/grade-school/GradeSchoolTest.cs +21 -41
- data/tracks/csharp/exercises/grains/Example.cs +1 -1
- data/tracks/csharp/exercises/grains/Grains.cs +14 -0
- data/tracks/csharp/exercises/grains/Grains.csproj +18 -0
- data/tracks/csharp/exercises/grains/GrainsTest.cs +17 -25
- data/tracks/csharp/exercises/grep/Grep.cs +9 -0
- data/tracks/csharp/exercises/grep/Grep.csproj +18 -0
- data/tracks/csharp/exercises/grep/GrepTest.cs +62 -79
- data/tracks/csharp/exercises/hamming/Example.cs +2 -15
- data/tracks/csharp/exercises/hamming/Hamming.cs +9 -0
- data/tracks/csharp/exercises/hamming/Hamming.csproj +18 -0
- data/tracks/csharp/exercises/hamming/HammingTest.cs +13 -19
- data/tracks/csharp/exercises/hangman/Example.cs +11 -11
- data/tracks/csharp/exercises/hangman/Hangman.cs +34 -0
- data/tracks/csharp/exercises/hangman/Hangman.csproj +18 -0
- data/tracks/csharp/exercises/hangman/HangmanTest.cs +37 -42
- data/tracks/csharp/exercises/hello-world/HelloWorld.cs +9 -0
- data/tracks/csharp/exercises/hello-world/HelloWorld.csproj +18 -0
- data/tracks/csharp/exercises/hello-world/HelloWorldTest.cs +3 -4
- data/tracks/csharp/exercises/house/House.cs +9 -0
- data/tracks/csharp/exercises/house/House.csproj +18 -0
- data/tracks/csharp/exercises/house/HouseTest.cs +3 -3
- data/tracks/csharp/exercises/isogram/Isogram.cs +9 -0
- data/tracks/csharp/exercises/isogram/Isogram.csproj +18 -0
- data/tracks/csharp/exercises/isogram/IsogramTest.cs +14 -14
- data/tracks/csharp/exercises/kindergarten-garden/KinderGartenGardenTest.cs +28 -33
- data/tracks/csharp/exercises/kindergarten-garden/KindergartenGarden.cs +27 -0
- data/tracks/csharp/exercises/kindergarten-garden/KindergartenGarden.csproj +18 -0
- data/tracks/csharp/exercises/largest-series-product/LargestSeriesProduct.cs +9 -0
- data/tracks/csharp/exercises/largest-series-product/LargestSeriesProduct.csproj +18 -0
- data/tracks/csharp/exercises/largest-series-product/LargestSeriesProductTest.cs +31 -48
- data/tracks/csharp/exercises/leap/Leap.cs +9 -0
- data/tracks/csharp/exercises/leap/Leap.csproj +18 -0
- data/tracks/csharp/exercises/leap/LeapTest.cs +9 -13
- data/tracks/csharp/exercises/ledger/Example.cs +16 -5
- data/tracks/csharp/exercises/ledger/Ledger.cs +4 -1
- data/tracks/csharp/exercises/ledger/Ledger.csproj +18 -0
- data/tracks/csharp/exercises/ledger/LedgerTest.cs +21 -21
- data/tracks/csharp/exercises/linked-list/LinkedList.cs +24 -0
- data/tracks/csharp/exercises/linked-list/LinkedList.csproj +18 -0
- data/tracks/csharp/exercises/linked-list/LinkedListTest.cs +34 -42
- data/tracks/csharp/exercises/list-ops/ListOps.cs +46 -0
- data/tracks/csharp/exercises/list-ops/ListOps.csproj +18 -0
- data/tracks/csharp/exercises/list-ops/ListOpsTest.cs +50 -73
- data/tracks/csharp/exercises/luhn/Luhn.cs +9 -0
- data/tracks/csharp/exercises/luhn/Luhn.csproj +18 -0
- data/tracks/csharp/exercises/luhn/LuhnTest.cs +10 -10
- data/tracks/csharp/exercises/markdown/Markdown.csproj +18 -0
- data/tracks/csharp/exercises/markdown/MarkdownTest.cs +19 -19
- data/tracks/csharp/exercises/matrix/Matrix.cs +34 -0
- data/tracks/csharp/exercises/matrix/Matrix.csproj +18 -0
- data/tracks/csharp/exercises/matrix/MatrixTest.cs +42 -36
- data/tracks/csharp/exercises/meetup/Meetup.cs +23 -0
- data/tracks/csharp/exercises/meetup/Meetup.csproj +18 -0
- data/tracks/csharp/exercises/meetup/MeetupTest.cs +61 -61
- data/tracks/csharp/exercises/minesweeper/Minesweeper.cs +9 -0
- data/tracks/csharp/exercises/minesweeper/Minesweeper.csproj +18 -0
- data/tracks/csharp/exercises/minesweeper/MinesweeperTest.cs +15 -22
- data/tracks/csharp/exercises/nth-prime/NthPrime.cs +11 -0
- data/tracks/csharp/exercises/nth-prime/NthPrime.csproj +18 -0
- data/tracks/csharp/exercises/nth-prime/NthPrimeTest.cs +15 -14
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCount.cs +24 -0
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCount.csproj +18 -0
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs +16 -24
- data/tracks/csharp/exercises/ocr-numbers/OcrNumbers.cs +9 -0
- data/tracks/csharp/exercises/ocr-numbers/OcrNumbers.csproj +18 -0
- data/tracks/csharp/exercises/ocr-numbers/OcrNumbersTest.cs +31 -45
- data/tracks/csharp/exercises/palindrome-products/PalindromeProducts.cs +42 -0
- data/tracks/csharp/exercises/palindrome-products/PalindromeProducts.csproj +18 -0
- data/tracks/csharp/exercises/palindrome-products/PalindromeTest.cs +25 -32
- data/tracks/csharp/exercises/pangram/Pangram.cs +9 -0
- data/tracks/csharp/exercises/pangram/Pangram.csproj +18 -0
- data/tracks/csharp/exercises/pangram/PangramTest.cs +21 -31
- data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.cs +10 -0
- data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.csproj +18 -0
- data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequencyTest.cs +17 -24
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.cs +10 -0
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.csproj +18 -0
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangleTest.cs +48 -20
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbers.cs +16 -0
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbers.csproj +18 -0
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbersTest.cs +16 -14
- data/tracks/csharp/exercises/phone-number/PhoneNumber.cs +24 -0
- data/tracks/csharp/exercises/phone-number/PhoneNumber.csproj +18 -0
- data/tracks/csharp/exercises/phone-number/PhoneNumberTest.cs +15 -22
- data/tracks/csharp/exercises/pig-latin/PigLatin.cs +9 -0
- data/tracks/csharp/exercises/pig-latin/PigLatin.csproj +18 -0
- data/tracks/csharp/exercises/pig-latin/PigLatinTest.cs +34 -43
- data/tracks/csharp/exercises/poker/Poker.cs +10 -0
- data/tracks/csharp/exercises/poker/Poker.csproj +18 -0
- data/tracks/csharp/exercises/poker/PokerTest.cs +40 -61
- data/tracks/csharp/exercises/pov/Pov.cs +43 -0
- data/tracks/csharp/exercises/pov/Pov.csproj +18 -0
- data/tracks/csharp/exercises/pov/PovTest.cs +24 -30
- data/tracks/csharp/exercises/prime-factors/PrimeFactors.cs +9 -0
- data/tracks/csharp/exercises/prime-factors/PrimeFactors.csproj +18 -0
- data/tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs +23 -34
- data/tracks/csharp/exercises/protein-translation/ProteinTranslation.cs +9 -0
- data/tracks/csharp/exercises/protein-translation/ProteinTranslation.csproj +18 -0
- data/tracks/csharp/exercises/protein-translation/ProteinTranslationTest.cs +37 -35
- data/tracks/csharp/exercises/proverb/Proverb.cs +14 -0
- data/tracks/csharp/exercises/proverb/Proverb.csproj +18 -0
- data/tracks/csharp/exercises/proverb/ProverbTest.cs +9 -12
- data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTriplet.cs +29 -0
- data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTriplet.csproj +18 -0
- data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTripletTest.cs +16 -21
- data/tracks/csharp/exercises/queen-attack/Example.cs +5 -14
- data/tracks/csharp/exercises/queen-attack/QueenAttack.cs +21 -0
- data/tracks/csharp/exercises/queen-attack/QueenAttack.csproj +18 -0
- data/tracks/csharp/exercises/queen-attack/QueenAttackTest.cs +17 -31
- data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipher.cs +18 -0
- data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipher.csproj +18 -0
- data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipherTest.cs +13 -18
- data/tracks/csharp/exercises/raindrops/Raindrops.cs +9 -0
- data/tracks/csharp/exercises/raindrops/Raindrops.csproj +18 -0
- data/tracks/csharp/exercises/raindrops/RaindropsTest.cs +29 -29
- data/tracks/csharp/exercises/react/React.cs +28 -0
- data/tracks/csharp/exercises/react/React.csproj +18 -0
- data/tracks/csharp/exercises/react/ReactTest.cs +24 -30
- data/tracks/csharp/exercises/rectangles/Example.cs +18 -19
- data/tracks/csharp/exercises/rectangles/Rectangles.cs +9 -0
- data/tracks/csharp/exercises/rectangles/Rectangles.csproj +18 -0
- data/tracks/csharp/exercises/rectangles/RectanglesTest.cs +21 -30
- data/tracks/csharp/exercises/rna-transcription/RnaTranscription.cs +9 -0
- data/tracks/csharp/exercises/rna-transcription/RnaTranscription.csproj +18 -0
- data/tracks/csharp/exercises/rna-transcription/RnaTranscriptionTest.cs +34 -0
- data/tracks/csharp/exercises/robot-name/RobotName.cs +17 -0
- data/tracks/csharp/exercises/robot-name/RobotName.csproj +18 -0
- data/tracks/csharp/exercises/robot-name/RobotNameTest.cs +10 -20
- data/tracks/csharp/exercises/robot-simulator/RobotSimulator.cs +64 -0
- data/tracks/csharp/exercises/robot-simulator/RobotSimulator.csproj +18 -0
- data/tracks/csharp/exercises/robot-simulator/RobotSimulatorTest.cs +19 -24
- data/tracks/csharp/exercises/roman-numerals/RomanNumerals.cs +9 -0
- data/tracks/csharp/exercises/roman-numerals/RomanNumerals.csproj +18 -0
- data/tracks/csharp/exercises/roman-numerals/RomanNumeralsTest.cs +23 -23
- data/tracks/csharp/exercises/run-length-encoding/RunLengthEncoding.cs +14 -0
- data/tracks/csharp/exercises/run-length-encoding/RunLengthEncoding.csproj +18 -0
- data/tracks/csharp/exercises/run-length-encoding/RunLengthEncodingTest.cs +15 -21
- data/tracks/csharp/exercises/saddle-points/SaddlePointTest.cs +11 -15
- data/tracks/csharp/exercises/saddle-points/SaddlePoints.cs +15 -0
- data/tracks/csharp/exercises/saddle-points/SaddlePoints.csproj +18 -0
- data/tracks/csharp/exercises/say/Example.cs +1 -1
- data/tracks/csharp/exercises/say/Say.cs +9 -0
- data/tracks/csharp/exercises/say/Say.csproj +18 -0
- data/tracks/csharp/exercises/say/SayTest.cs +34 -48
- data/tracks/csharp/exercises/scale-generator/Example.cs +1 -1
- data/tracks/csharp/exercises/scale-generator/ScaleGenerator.cs +9 -0
- data/tracks/csharp/exercises/scale-generator/ScaleGenerator.csproj +18 -0
- data/tracks/csharp/exercises/scale-generator/ScaleGeneratorTest.cs +29 -42
- data/tracks/csharp/exercises/scrabble-score/ScrabbleScore.cs +9 -0
- data/tracks/csharp/exercises/scrabble-score/ScrabbleScore.csproj +18 -0
- data/tracks/csharp/exercises/scrabble-score/ScrabbleScoreTest.cs +19 -28
- data/tracks/csharp/exercises/secret-handshake/SecretHandshake.cs +10 -0
- data/tracks/csharp/exercises/secret-handshake/SecretHandshake.csproj +18 -0
- data/tracks/csharp/exercises/secret-handshake/SecretHandshakeTest.cs +15 -22
- data/tracks/csharp/exercises/series/Series.cs +13 -0
- data/tracks/csharp/exercises/series/Series.csproj +18 -0
- data/tracks/csharp/exercises/series/SeriesTest.cs +26 -25
- data/tracks/csharp/exercises/sgf-parsing/Example.cs +11 -1
- data/tracks/csharp/exercises/sgf-parsing/SgfParsing.cs +12 -3
- data/tracks/csharp/exercises/sgf-parsing/SgfParsing.csproj +19 -0
- data/tracks/csharp/exercises/sgf-parsing/SgfParsingTest.cs +27 -37
- data/tracks/csharp/exercises/sieve/Sieve.cs +9 -0
- data/tracks/csharp/exercises/sieve/Sieve.csproj +18 -0
- data/tracks/csharp/exercises/sieve/SieveTest.cs +8 -12
- data/tracks/csharp/exercises/simple-cipher/SimpleCipher.cs +32 -0
- data/tracks/csharp/exercises/simple-cipher/SimpleCipher.csproj +18 -0
- data/tracks/csharp/exercises/simple-cipher/SimpleCipherTest.cs +44 -75
- data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedList.cs +48 -0
- data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedList.csproj +18 -0
- data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedListTest.cs +31 -35
- data/tracks/csharp/exercises/space-age/Example.cs +21 -21
- data/tracks/csharp/exercises/space-age/SpaceAge.cs +48 -0
- data/tracks/csharp/exercises/space-age/SpaceAge.csproj +18 -0
- data/tracks/csharp/exercises/space-age/SpaceAgeTest.cs +24 -41
- data/tracks/csharp/exercises/strain/Strain.cs +15 -0
- data/tracks/csharp/exercises/strain/Strain.csproj +18 -0
- data/tracks/csharp/exercises/strain/StrainTest.cs +25 -37
- data/tracks/csharp/exercises/sublist/Sublist.cs +19 -0
- data/tracks/csharp/exercises/sublist/Sublist.csproj +18 -0
- data/tracks/csharp/exercises/sublist/SublistTest.cs +37 -54
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiples.cs +10 -0
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiples.csproj +18 -0
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs +15 -22
- data/tracks/csharp/exercises/tournament/Tournament.cs +10 -0
- data/tracks/csharp/exercises/tournament/Tournament.csproj +18 -0
- data/tracks/csharp/exercises/tournament/TournamentTest.cs +10 -13
- data/tracks/csharp/exercises/transpose/Transpose.cs +9 -0
- data/tracks/csharp/exercises/transpose/Transpose.csproj +18 -0
- data/tracks/csharp/exercises/transpose/TransposeTest.cs +21 -30
- data/tracks/csharp/exercises/tree-building/TreeBuilding.csproj +18 -0
- data/tracks/csharp/exercises/tree-building/TreeBuildingTest.cs +27 -26
- data/tracks/csharp/exercises/triangle/Example.cs +1 -1
- data/tracks/csharp/exercises/triangle/Triangle.cs +18 -0
- data/tracks/csharp/exercises/triangle/Triangle.csproj +18 -0
- data/tracks/csharp/exercises/triangle/TriangleTest.cs +26 -41
- data/tracks/csharp/exercises/twelve-days/Example.cs +4 -4
- data/tracks/csharp/exercises/twelve-days/TwelveDays.cs +19 -0
- data/tracks/csharp/exercises/twelve-days/TwelveDays.csproj +18 -0
- data/tracks/csharp/exercises/twelve-days/TwelveDaysTest.cs +29 -51
- data/tracks/csharp/exercises/two-bucket/TwoBucket.cs +27 -0
- data/tracks/csharp/exercises/two-bucket/TwoBucket.csproj +18 -0
- data/tracks/csharp/exercises/two-bucket/TwoBucketTest.cs +17 -20
- data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantity.cs +14 -0
- data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantity.csproj +18 -0
- data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantityTest.cs +40 -51
- data/tracks/csharp/exercises/word-count/Example.cs +1 -1
- data/tracks/csharp/exercises/word-count/WordCount.cs +10 -0
- data/tracks/csharp/exercises/word-count/WordCount.csproj +18 -0
- data/tracks/csharp/exercises/word-count/WordCountTest.cs +23 -34
- data/tracks/csharp/exercises/word-search/Example.cs +18 -20
- data/tracks/csharp/exercises/word-search/WordSearch.cs +16 -0
- data/tracks/csharp/exercises/word-search/WordSearch.csproj +18 -0
- data/tracks/csharp/exercises/word-search/WordSearchTest.cs +30 -31
- data/tracks/csharp/exercises/wordy/Example.cs +1 -1
- data/tracks/csharp/exercises/wordy/Wordy.cs +9 -0
- data/tracks/csharp/exercises/wordy/Wordy.csproj +18 -0
- data/tracks/csharp/exercises/wordy/WordyTest.cs +34 -49
- data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzle.cs +22 -0
- data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzle.csproj +18 -0
- data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzleTest.cs +5 -6
- data/tracks/csharp/exercises/zipper/Zipper.cs +64 -0
- data/tracks/csharp/exercises/zipper/Zipper.csproj +18 -0
- data/tracks/csharp/exercises/zipper/ZipperTest.cs +31 -29
- data/tracks/csharp/paket.dependencies +1 -5
- data/tracks/csharp/paket.lock +1 -78
- data/tracks/go/README.md +10 -3
- data/tracks/go/bin/test-without-stubs +1 -1
- data/tracks/go/docs/TESTS.md +7 -0
- data/tracks/go/exercises/beer-song/example.go +1 -1
- data/tracks/go/exercises/binary-search/binary_search_test.go +1 -1
- data/tracks/go/exercises/clock/example_clock_test.go +40 -0
- data/tracks/go/exercises/grade-school/grade_school_test.go +1 -1
- data/tracks/go/exercises/hello-world/hello_example_test.go +20 -0
- data/tracks/go/exercises/minesweeper/minesweeper_test.go +1 -1
- data/tracks/go/exercises/pov/pov_test.go +4 -1
- data/tracks/java/exercises/pangram/src/example/java/{Pangrams.java → PangramChecker.java} +5 -3
- data/tracks/java/exercises/pangram/src/main/java/PangramChecker.java +6 -0
- data/tracks/java/exercises/pangram/src/test/java/PangramCheckerTest.java +82 -0
- data/tracks/ocaml/exercises/run-length-encoding/test.ml +9 -1
- data/tracks/ocaml/tools/test-generator/src/parser.ml +1 -1
- data/tracks/ocaml/tools/test-generator/src/special_cases.ml +15 -7
- data/tracks/python/exercises/list-ops/example.py +6 -6
- data/tracks/python/exercises/list-ops/list_ops_test.py +22 -37
- data/tracks/typescript/.gitignore +1 -1
- data/tracks/typescript/config.json +12 -0
- data/tracks/typescript/exercises/etl/etl.example.ts +16 -0
- data/tracks/typescript/exercises/etl/etl.test.ts +48 -0
- data/tracks/typescript/exercises/etl/package.json +36 -0
- data/tracks/typescript/exercises/etl/tsconfig.json +21 -0
- data/tracks/typescript/exercises/etl/tslint.json +127 -0
- data/tracks/typescript/exercises/etl/yarn.lock +2739 -0
- data/tracks/typescript/exercises/robot-name/robot-name.example.ts +1 -1
- data/tracks/typescript/exercises/space-age/package.json +36 -0
- data/tracks/typescript/exercises/space-age/space-age.example.ts +21 -0
- data/tracks/typescript/exercises/space-age/space-age.test.ts +56 -0
- data/tracks/typescript/exercises/space-age/tsconfig.json +21 -0
- data/tracks/typescript/exercises/space-age/tslint.json +127 -0
- data/tracks/typescript/exercises/space-age/yarn.lock +2739 -0
- metadata +226 -26
- data/tracks/csharp/docs/img/AddFiles.png +0 -0
- data/tracks/csharp/docs/img/SolutionExplorer.png +0 -0
- data/tracks/csharp/docs/img/TestExplorer.png +0 -0
- data/tracks/csharp/docs/img/addNewClass.png +0 -0
- data/tracks/csharp/docs/img/createNewProject.png +0 -0
- data/tracks/csharp/docs/img/dragDropFolders.png +0 -0
- data/tracks/csharp/docs/img/nUnitExecuteTests.png +0 -0
- data/tracks/csharp/docs/img/nUnitRunner.png +0 -0
- data/tracks/csharp/docs/img/newProject.png +0 -0
- data/tracks/csharp/docs/img/nugetManageNunitRunner.png +0 -0
- data/tracks/csharp/docs/img/nugetMenu.png +0 -0
- data/tracks/csharp/docs/img/xamarin-add-new-project.png +0 -0
- data/tracks/csharp/docs/img/xamarin-add-reference.png +0 -0
- data/tracks/csharp/docs/img/xamarin-csharp.jpg +0 -0
- data/tracks/csharp/docs/img/xamarin-edit-reference.png +0 -0
- data/tracks/csharp/docs/img/xamarin-naming.png +0 -0
- data/tracks/csharp/docs/img/xamarin-nunit.jpg +0 -0
- data/tracks/csharp/docs/img/xamarin-tests.png +0 -0
- data/tracks/csharp/exercises/exercises.csproj +0 -363
- data/tracks/csharp/exercises/paket.references +0 -2
- data/tracks/csharp/exercises/rna-transcription/ComplementTest.cs +0 -39
- data/tracks/java/exercises/pangram/src/main/java/.keep +0 -0
- data/tracks/java/exercises/pangram/src/test/java/PangramsTest.java +0 -75
@@ -1,8 +1,8 @@
|
|
1
|
-
using
|
1
|
+
using Xunit;
|
2
2
|
|
3
3
|
public class HouseTest
|
4
4
|
{
|
5
|
-
[
|
5
|
+
[Fact]
|
6
6
|
public void Rhyme_is_correct()
|
7
7
|
{
|
8
8
|
const string expected =
|
@@ -96,6 +96,6 @@ public class HouseTest
|
|
96
96
|
"that ate the malt\n" +
|
97
97
|
"that lay in the house that Jack built.";
|
98
98
|
|
99
|
-
Assert.
|
99
|
+
Assert.Equal(expected, House.Rhyme());
|
100
100
|
}
|
101
101
|
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2
|
+
|
3
|
+
<PropertyGroup>
|
4
|
+
<OutputType>Exe</OutputType>
|
5
|
+
<TargetFramework>netcoreapp1.0</TargetFramework>
|
6
|
+
</PropertyGroup>
|
7
|
+
|
8
|
+
<ItemGroup>
|
9
|
+
<Compile Remove="Example.cs" />
|
10
|
+
</ItemGroup>
|
11
|
+
|
12
|
+
<ItemGroup>
|
13
|
+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
|
14
|
+
<PackageReference Include="xunit" Version="2.2.0" />
|
15
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
16
|
+
</ItemGroup>
|
17
|
+
|
18
|
+
</Project>
|
@@ -1,20 +1,20 @@
|
|
1
|
-
using
|
1
|
+
using Xunit;
|
2
2
|
|
3
|
-
[TestFixture]
|
4
3
|
public class IsogramTest
|
5
4
|
{
|
6
|
-
[
|
7
|
-
[
|
8
|
-
[
|
9
|
-
[
|
10
|
-
[
|
11
|
-
[
|
12
|
-
[
|
13
|
-
[
|
14
|
-
[
|
15
|
-
[
|
16
|
-
|
5
|
+
[Theory]
|
6
|
+
[InlineData("duplicates", true)]
|
7
|
+
[InlineData("eleven", false)]
|
8
|
+
[InlineData("subdermatoglyphic", true)]
|
9
|
+
[InlineData("Alphabet", false)]
|
10
|
+
[InlineData("thumbscrew-japingly", true)]
|
11
|
+
[InlineData("Hjelmqvist-Gryb-Zock-Pfund-Wax", true)]
|
12
|
+
[InlineData("Heizölrückstoßabdämpfung", true)]
|
13
|
+
[InlineData("the quick brown fox", false)]
|
14
|
+
[InlineData("Emily Jung Schwartzkopf", true)]
|
15
|
+
[InlineData("éléphant", false)]
|
16
|
+
public void Isogram_correctly_detects_isograms(string input, bool expected)
|
17
17
|
{
|
18
|
-
|
18
|
+
Assert.Equal(expected, Isogram.IsIsogram(input));
|
19
19
|
}
|
20
20
|
}
|
@@ -1,65 +1,60 @@
|
|
1
|
-
using
|
1
|
+
using Xunit;
|
2
2
|
|
3
3
|
public class KinderGartenGardenTest
|
4
4
|
{
|
5
|
-
[
|
5
|
+
[Fact]
|
6
6
|
public void Missing_child()
|
7
7
|
{
|
8
8
|
var actual = Garden.DefaultGarden("RC\nGG").GetPlants("Potter");
|
9
|
-
Assert.
|
9
|
+
Assert.Empty(actual);
|
10
10
|
}
|
11
11
|
|
12
|
-
[
|
13
|
-
[Test]
|
12
|
+
[Fact(Skip = "Remove to run test")]
|
14
13
|
public void Alice()
|
15
14
|
{
|
16
|
-
Assert.
|
17
|
-
Assert.
|
15
|
+
Assert.Equal(new [] { Plant.Radishes, Plant.Clover, Plant.Grass, Plant.Grass }, Garden.DefaultGarden("RC\nGG").GetPlants("Alice"));
|
16
|
+
Assert.Equal(new[] { Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Clover }, Garden.DefaultGarden("VC\nRC").GetPlants("Alice"));
|
18
17
|
}
|
19
18
|
|
20
|
-
[
|
21
|
-
[Test]
|
19
|
+
[Fact(Skip = "Remove to run test")]
|
22
20
|
public void Small_garden()
|
23
21
|
{
|
24
22
|
var actual = Garden.DefaultGarden("VVCG\nVVRC").GetPlants("Bob");
|
25
|
-
Assert.
|
23
|
+
Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Radishes, Plant.Clover }, actual);
|
26
24
|
}
|
27
25
|
|
28
|
-
[
|
29
|
-
[Test]
|
26
|
+
[Fact(Skip = "Remove to run test")]
|
30
27
|
public void Medium_garden()
|
31
28
|
{
|
32
29
|
var garden = Garden.DefaultGarden("VVCCGG\nVVCCGG");
|
33
|
-
Assert.
|
34
|
-
Assert.
|
30
|
+
Assert.Equal(new[] { Plant.Clover, Plant.Clover, Plant.Clover, Plant.Clover }, garden.GetPlants("Bob"));
|
31
|
+
Assert.Equal(new[] { Plant.Grass, Plant.Grass, Plant.Grass, Plant.Grass }, garden.GetPlants("Charlie"));
|
35
32
|
}
|
36
33
|
|
37
|
-
[
|
38
|
-
[Test]
|
34
|
+
[Fact(Skip = "Remove to run test")]
|
39
35
|
public void Full_garden()
|
40
36
|
{
|
41
37
|
var garden = Garden.DefaultGarden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV");
|
42
|
-
Assert.
|
43
|
-
Assert.
|
44
|
-
Assert.
|
45
|
-
Assert.
|
46
|
-
Assert.
|
47
|
-
Assert.
|
48
|
-
Assert.
|
49
|
-
Assert.
|
50
|
-
Assert.
|
51
|
-
Assert.
|
52
|
-
Assert.
|
38
|
+
Assert.Equal(new[] { Plant.Violets, Plant.Radishes, Plant.Violets, Plant.Radishes }, garden.GetPlants("Alice"));
|
39
|
+
Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Clover, Plant.Clover }, garden.GetPlants("Bob"));
|
40
|
+
Assert.Equal(new[] { Plant.Radishes, Plant.Violets, Plant.Clover, Plant.Radishes }, garden.GetPlants("David"));
|
41
|
+
Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Radishes, Plant.Grass }, garden.GetPlants("Eve"));
|
42
|
+
Assert.Equal(new[] { Plant.Grass, Plant.Clover, Plant.Violets, Plant.Clover }, garden.GetPlants("Fred"));
|
43
|
+
Assert.Equal(new[] { Plant.Clover, Plant.Grass, Plant.Grass, Plant.Clover }, garden.GetPlants("Ginny"));
|
44
|
+
Assert.Equal(new[] { Plant.Violets, Plant.Radishes, Plant.Radishes, Plant.Violets }, garden.GetPlants("Harriet"));
|
45
|
+
Assert.Equal(new[] { Plant.Grass, Plant.Clover, Plant.Violets, Plant.Clover }, garden.GetPlants("Ileana"));
|
46
|
+
Assert.Equal(new[] { Plant.Violets, Plant.Clover, Plant.Violets, Plant.Grass }, garden.GetPlants("Joseph"));
|
47
|
+
Assert.Equal(new[] { Plant.Grass, Plant.Clover, Plant.Clover, Plant.Grass }, garden.GetPlants("Kincaid"));
|
48
|
+
Assert.Equal(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Violets }, garden.GetPlants("Larry"));
|
53
49
|
}
|
54
50
|
|
55
|
-
[
|
56
|
-
[Test]
|
51
|
+
[Fact(Skip = "Remove to run test")]
|
57
52
|
public void Surprise_garden()
|
58
53
|
{
|
59
54
|
var garden = new Garden(new [] { "Samantha", "Patricia", "Xander", "Roger" }, "VCRRGVRG\nRVGCCGCV");
|
60
|
-
Assert.
|
61
|
-
Assert.
|
62
|
-
Assert.
|
63
|
-
Assert.
|
55
|
+
Assert.Equal(new[] { Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Violets }, garden.GetPlants("Patricia"));
|
56
|
+
Assert.Equal(new[] { Plant.Radishes, Plant.Radishes, Plant.Grass, Plant.Clover }, garden.GetPlants("Roger"));
|
57
|
+
Assert.Equal(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Grass }, garden.GetPlants("Samantha"));
|
58
|
+
Assert.Equal(new[] { Plant.Radishes, Plant.Grass, Plant.Clover, Plant.Violets }, garden.GetPlants("Xander"));
|
64
59
|
}
|
65
60
|
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
using System;
|
2
|
+
using System.Collections.Generic;
|
3
|
+
|
4
|
+
public enum Plant
|
5
|
+
{
|
6
|
+
Violets,
|
7
|
+
Radishes,
|
8
|
+
Clover,
|
9
|
+
Grass
|
10
|
+
}
|
11
|
+
|
12
|
+
public class Garden
|
13
|
+
{
|
14
|
+
public Garden(IEnumerable<string> children, string windowSills)
|
15
|
+
{
|
16
|
+
}
|
17
|
+
|
18
|
+
public IEnumerable<Plant> GetPlants(string child)
|
19
|
+
{
|
20
|
+
throw new NotImplementedException("You need to implement this function.");
|
21
|
+
}
|
22
|
+
|
23
|
+
public static Garden DefaultGarden(string windowSills)
|
24
|
+
{
|
25
|
+
throw new NotImplementedException("You need to implement this function.");
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2
|
+
|
3
|
+
<PropertyGroup>
|
4
|
+
<OutputType>Exe</OutputType>
|
5
|
+
<TargetFramework>netcoreapp1.0</TargetFramework>
|
6
|
+
</PropertyGroup>
|
7
|
+
|
8
|
+
<ItemGroup>
|
9
|
+
<Compile Remove="Example.cs" />
|
10
|
+
</ItemGroup>
|
11
|
+
|
12
|
+
<ItemGroup>
|
13
|
+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
|
14
|
+
<PackageReference Include="xunit" Version="2.2.0" />
|
15
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
16
|
+
</ItemGroup>
|
17
|
+
|
18
|
+
</Project>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
2
|
+
|
3
|
+
<PropertyGroup>
|
4
|
+
<OutputType>Exe</OutputType>
|
5
|
+
<TargetFramework>netcoreapp1.0</TargetFramework>
|
6
|
+
</PropertyGroup>
|
7
|
+
|
8
|
+
<ItemGroup>
|
9
|
+
<Compile Remove="Example.cs" />
|
10
|
+
</ItemGroup>
|
11
|
+
|
12
|
+
<ItemGroup>
|
13
|
+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
|
14
|
+
<PackageReference Include="xunit" Version="2.2.0" />
|
15
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
|
16
|
+
</ItemGroup>
|
17
|
+
|
18
|
+
</Project>
|
@@ -1,153 +1,139 @@
|
|
1
1
|
using System;
|
2
|
-
using
|
2
|
+
using Xunit;
|
3
3
|
|
4
|
-
[TestFixture]
|
5
4
|
public class LargestSeriesProductTest
|
6
5
|
{
|
7
|
-
[
|
6
|
+
[Fact]
|
8
7
|
public void Can_find_the_largest_product_of_2_with_numbers_in_order()
|
9
8
|
{
|
10
9
|
const string digits = "0123456789";
|
11
10
|
const int span = 2;
|
12
11
|
const int expected = 72;
|
13
12
|
|
14
|
-
Assert.
|
13
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
15
14
|
}
|
16
15
|
|
17
|
-
[
|
18
|
-
[Test]
|
16
|
+
[Fact(Skip = "Remove to run test")]
|
19
17
|
public void Can_find_the_largest_product_of_2()
|
20
18
|
{
|
21
19
|
const string digits = "576802143";
|
22
20
|
const int span = 2;
|
23
21
|
const int expected = 48;
|
24
22
|
|
25
|
-
Assert.
|
23
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
26
24
|
}
|
27
25
|
|
28
|
-
[
|
29
|
-
[Test]
|
26
|
+
[Fact(Skip = "Remove to run test")]
|
30
27
|
public void Finds_the_largest_product_if_span_equals_length()
|
31
28
|
{
|
32
29
|
const string digits = "29";
|
33
30
|
const int span = 2;
|
34
31
|
const int expected = 18;
|
35
32
|
|
36
|
-
Assert.
|
33
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
37
34
|
}
|
38
35
|
|
39
|
-
[
|
40
|
-
[Test]
|
36
|
+
[Fact(Skip = "Remove to run test")]
|
41
37
|
public void Can_find_the_largest_product_of_3_with_numbers_in_order()
|
42
38
|
{
|
43
39
|
const string digits = "0123456789";
|
44
40
|
const int span = 3;
|
45
41
|
const int expected = 504;
|
46
42
|
|
47
|
-
Assert.
|
43
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
48
44
|
}
|
49
45
|
|
50
|
-
[
|
51
|
-
[Test]
|
46
|
+
[Fact(Skip = "Remove to run test")]
|
52
47
|
public void Can_find_the_largest_product_of_3()
|
53
48
|
{
|
54
49
|
const string digits = "1027839564";
|
55
50
|
const int span = 3;
|
56
51
|
const int expected = 270;
|
57
52
|
|
58
|
-
Assert.
|
53
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
59
54
|
}
|
60
55
|
|
61
|
-
[
|
62
|
-
[Test]
|
56
|
+
[Fact(Skip = "Remove to run test")]
|
63
57
|
public void Can_find_the_largest_product_of_5_with_numbers_in_order()
|
64
58
|
{
|
65
59
|
const string digits = "0123456789";
|
66
60
|
const int span = 5;
|
67
61
|
const int expected = 15120;
|
68
62
|
|
69
|
-
Assert.
|
63
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
70
64
|
}
|
71
65
|
|
72
|
-
[
|
73
|
-
[Test]
|
66
|
+
[Fact(Skip = "Remove to run test")]
|
74
67
|
public void Can_get_the_largest_product_of_a_big_number()
|
75
68
|
{
|
76
69
|
const string digits = "73167176531330624919225119674426574742355349194934";
|
77
70
|
const int span = 6;
|
78
71
|
const int expected = 23520;
|
79
72
|
|
80
|
-
Assert.
|
73
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
81
74
|
}
|
82
75
|
|
83
|
-
[
|
84
|
-
[Test]
|
76
|
+
[Fact(Skip = "Remove to run test")]
|
85
77
|
public void Can_get_the_largest_product_of_a_big_number_II()
|
86
78
|
{
|
87
79
|
const string digits = "52677741234314237566414902593461595376319419139427";
|
88
80
|
const int span = 6;
|
89
81
|
const int expected = 28350;
|
90
82
|
|
91
|
-
Assert.
|
83
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
92
84
|
}
|
93
85
|
|
94
|
-
[
|
95
|
-
[Test]
|
86
|
+
[Fact(Skip = "Remove to run test")]
|
96
87
|
public void Can_get_the_largest_product_of_a_big_number_III()
|
97
88
|
{
|
98
89
|
const string digits = "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450";
|
99
90
|
const int span = 13;
|
100
91
|
const long expected = 23514624000;
|
101
92
|
|
102
|
-
Assert.
|
93
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
103
94
|
}
|
104
95
|
|
105
|
-
[
|
106
|
-
[Test]
|
96
|
+
[Fact(Skip = "Remove to run test")]
|
107
97
|
public void Reports_zero_if_the_only_digits_are_zero()
|
108
98
|
{
|
109
99
|
const string digits = "0000";
|
110
100
|
const int span = 2;
|
111
101
|
const int expected = 0;
|
112
102
|
|
113
|
-
Assert.
|
103
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
114
104
|
}
|
115
105
|
|
116
|
-
[
|
117
|
-
[Test]
|
106
|
+
[Fact(Skip = "Remove to run test")]
|
118
107
|
public void Reports_zero_if_all_spans_include_zero()
|
119
108
|
{
|
120
109
|
const string digits = "99099";
|
121
110
|
const int span = 3;
|
122
111
|
const int expected = 0;
|
123
112
|
|
124
|
-
Assert.
|
113
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
125
114
|
}
|
126
115
|
|
127
|
-
[
|
128
|
-
[Test]
|
116
|
+
[Fact(Skip = "Remove to run test")]
|
129
117
|
public void Reports_1_for_empty_string_and_empty_product_0_span()
|
130
118
|
{
|
131
119
|
const string digits = "";
|
132
120
|
const int span = 0;
|
133
121
|
const int expected = 1;
|
134
122
|
|
135
|
-
Assert.
|
123
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
136
124
|
}
|
137
125
|
|
138
|
-
[
|
139
|
-
[Test]
|
126
|
+
[Fact(Skip = "Remove to run test")]
|
140
127
|
public void Reports_1_for_nonempty_string_and_empty_product_0_span()
|
141
128
|
{
|
142
129
|
const string digits = "123";
|
143
130
|
const int span = 0;
|
144
131
|
const int expected = 1;
|
145
132
|
|
146
|
-
Assert.
|
133
|
+
Assert.Equal(expected, LargestSeriesProduct.GetLargestProduct(digits, span));
|
147
134
|
}
|
148
135
|
|
149
|
-
[
|
150
|
-
[Test]
|
136
|
+
[Fact(Skip = "Remove to run test")]
|
151
137
|
public void Rejects_span_longer_than_string_length()
|
152
138
|
{
|
153
139
|
const string digits = "123";
|
@@ -156,8 +142,7 @@ public class LargestSeriesProductTest
|
|
156
142
|
Assert.Throws<ArgumentException>(() => LargestSeriesProduct.GetLargestProduct(digits, span));
|
157
143
|
}
|
158
144
|
|
159
|
-
[
|
160
|
-
[Test]
|
145
|
+
[Fact(Skip = "Remove to run test")]
|
161
146
|
public void Rejects_empty_string_and_nonzero_span()
|
162
147
|
{
|
163
148
|
const string digits = "";
|
@@ -166,8 +151,7 @@ public class LargestSeriesProductTest
|
|
166
151
|
Assert.Throws<ArgumentException>(() => LargestSeriesProduct.GetLargestProduct(digits, span));
|
167
152
|
}
|
168
153
|
|
169
|
-
[
|
170
|
-
[Test]
|
154
|
+
[Fact(Skip = "Remove to run test")]
|
171
155
|
public void Rejects_invalid_character_in_digits()
|
172
156
|
{
|
173
157
|
const string digits = "1234a5";
|
@@ -176,8 +160,7 @@ public class LargestSeriesProductTest
|
|
176
160
|
Assert.Throws<ArgumentException>(() => LargestSeriesProduct.GetLargestProduct(digits, span));
|
177
161
|
}
|
178
162
|
|
179
|
-
[
|
180
|
-
[Test]
|
163
|
+
[Fact(Skip = "Remove to run test")]
|
181
164
|
public void Rejects_negative_span()
|
182
165
|
{
|
183
166
|
const string digits = "12345";
|