trackler 2.0.8.24 → 2.0.8.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/config.json +9 -0
- data/tracks/c/exercises/nucleotide-count/makefile +15 -0
- data/tracks/c/exercises/nucleotide-count/src/example.c +43 -0
- data/tracks/c/exercises/nucleotide-count/src/example.h +6 -0
- data/tracks/c/exercises/nucleotide-count/test/test_nucleotide_count.c +58 -0
- data/tracks/c/exercises/nucleotide-count/test/vendor/unity.c +1300 -0
- data/tracks/c/exercises/nucleotide-count/test/vendor/unity.h +274 -0
- data/tracks/c/exercises/nucleotide-count/test/vendor/unity_internals.h +701 -0
- data/tracks/ceylon/README.md +2 -2
- data/tracks/csharp/.gitattributes +11 -0
- data/tracks/csharp/appveyor.yml +1 -4
- data/tracks/csharp/exercises/acronym/AcronymTest.cs +1 -1
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipher.cs +8 -3
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipherTest.cs +76 -0
- data/tracks/csharp/exercises/atbash-cipher/Example.cs +22 -23
- data/tracks/csharp/exercises/isogram/Example.cs +2 -2
- data/tracks/csharp/exercises/isogram/IsogramTest.cs +47 -15
- data/tracks/csharp/exercises/nth-prime/Example.cs +4 -1
- data/tracks/csharp/exercises/nth-prime/NthPrime.cs +1 -1
- data/tracks/csharp/exercises/nth-prime/NthPrimeTest.cs +29 -15
- data/tracks/csharp/exercises/perfect-numbers/Example.cs +14 -16
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbers.cs +2 -2
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbersTest.cs +78 -26
- data/tracks/csharp/exercises/pig-latin/PigLatinTest.cs +69 -24
- data/tracks/csharp/exercises/raindrops/Example.cs +1 -1
- data/tracks/csharp/exercises/raindrops/RaindropsTest.cs +93 -31
- data/tracks/csharp/exercises/roman-numerals/HINTS.md +2 -0
- data/tracks/csharp/exercises/roman-numerals/RomanNumeralsTest.cs +106 -23
- data/tracks/csharp/exercises/word-search/HINTS.md +6 -0
- data/tracks/csharp/generators/{TestClass.cs → Classes/TestClass.cs} +2 -1
- data/tracks/csharp/generators/{TestClassNameTransformer.cs → Classes/TestClassNameTransformer.cs} +1 -1
- data/tracks/csharp/generators/{TestClassRenderer.cs → Classes/TestClassRenderer.cs} +2 -1
- data/tracks/csharp/generators/Classes/TestedClassNameTransformer.cs +9 -0
- data/tracks/csharp/generators/{CanonicalData.cs → Data/CanonicalData.cs} +1 -1
- data/tracks/csharp/generators/{CanonicalDataCase.cs → Data/CanonicalDataCase.cs} +3 -3
- data/tracks/csharp/generators/{CanonicalDataCaseJsonConverter.cs → Data/CanonicalDataCaseJsonConverter.cs} +1 -1
- data/tracks/csharp/generators/{CanonicalDataCasesJsonConverter.cs → Data/CanonicalDataCasesJsonConverter.cs} +2 -2
- data/tracks/csharp/generators/{CanonicalDataParser.cs → Data/CanonicalDataParser.cs} +5 -5
- data/tracks/csharp/generators/{ExerciseCollection.cs → Data/ExerciseCollection.cs} +3 -3
- data/tracks/csharp/generators/Exercises/AcronymExercise.cs +20 -0
- data/tracks/csharp/generators/Exercises/AtbashCipherExercise.cs +20 -0
- data/tracks/csharp/generators/Exercises/BooleanExercise.cs +14 -0
- data/tracks/csharp/generators/Exercises/EqualityExercise.cs +14 -0
- data/tracks/csharp/generators/Exercises/Exercise.cs +59 -4
- data/tracks/csharp/generators/Exercises/IsogramExercise.cs +9 -0
- data/tracks/csharp/generators/Exercises/LeapExercise.cs +1 -4
- data/tracks/csharp/generators/Exercises/NthPrimeExercise.cs +25 -0
- data/tracks/csharp/generators/Exercises/PerfectNumbersExercise.cs +29 -0
- data/tracks/csharp/generators/Exercises/PigLatinExercise.cs +9 -0
- data/tracks/csharp/generators/Exercises/RaindropsExercise.cs +20 -0
- data/tracks/csharp/generators/Exercises/RomanNumeralsExercise.cs +30 -0
- data/tracks/csharp/generators/Helpers/StringExtensions.cs +8 -0
- data/tracks/csharp/generators/{To.cs → Helpers/To.cs} +4 -1
- data/tracks/csharp/generators/Methods/BooleanTestMethodGenerator.cs +32 -0
- data/tracks/csharp/generators/Methods/EqualityTestMethodGenerator.cs +25 -0
- data/tracks/csharp/generators/Methods/ExceptionTestMethodGenerator.cs +30 -0
- data/tracks/csharp/generators/{TestMethod.cs → Methods/TestMethod.cs} +6 -3
- data/tracks/csharp/generators/Methods/TestMethodData.cs +12 -0
- data/tracks/csharp/generators/Methods/TestMethodGenerator.cs +64 -0
- data/tracks/csharp/generators/Methods/TestMethodNameTransformer.cs +23 -0
- data/tracks/csharp/generators/Methods/TestMethodOptions.cs +13 -0
- data/tracks/csharp/generators/{TestMethodRenderer.cs → Methods/TestMethodRenderer.cs} +1 -1
- data/tracks/csharp/generators/{TestedMethodNameTransformer.cs → Methods/TestedMethodNameTransformer.cs} +1 -1
- data/tracks/csharp/generators/Methods/TestedMethodType.cs +9 -0
- data/tracks/csharp/generators/Program.cs +2 -0
- data/tracks/elixir/config.json +7 -0
- data/tracks/elixir/exercises/diffie-hellman/HINTS.md +10 -0
- data/tracks/elixir/exercises/diffie-hellman/diffie_hellman.exs +61 -0
- data/tracks/elixir/exercises/diffie-hellman/diffie_hellman_test.exs +99 -0
- data/tracks/elixir/exercises/diffie-hellman/example.exs +64 -0
- data/tracks/haskell/exercises/pov/src/POV.hs +2 -2
- data/tracks/haskell/exercises/pythagorean-triplet/src/Triplet.hs +6 -3
- data/tracks/haskell/exercises/queen-attack/src/Queens.hs +1 -1
- data/tracks/haskell/exercises/raindrops/src/Raindrops.hs +2 -1
- data/tracks/haskell/exercises/robot-name/src/Robot.hs +2 -2
- data/tracks/haskell/exercises/robot-simulator/src/Robot.hs +6 -6
- data/tracks/haskell/exercises/roman-numerals/src/Roman.hs +2 -1
- data/tracks/haskell/exercises/run-length-encoding/src/RunLength.hs +2 -2
- data/tracks/haskell/exercises/saddle-points/src/Matrix.hs +2 -1
- data/tracks/haskell/exercises/say/src/Say.hs +2 -1
- data/tracks/haskell/exercises/scrabble-score/src/Scrabble.hs +4 -2
- data/tracks/haskell/exercises/secret-handshake/src/SecretHandshake.hs +1 -1
- data/tracks/haskell/exercises/sgf-parsing/src/Sgf.hs +1 -1
- data/tracks/java/exercises/acronym/src/example/java/Acronym.java +11 -1
- data/tracks/java/exercises/acronym/src/test/java/AcronymTest.java +8 -9
- data/tracks/java/exercises/grade-school/src/test/java/SchoolTest.java +8 -2
- data/tracks/java/exercises/luhn/src/test/java/LuhnValidatorTest.java +20 -13
- data/tracks/java/exercises/robot-name/src/test/java/RobotTest.java +6 -1
- data/tracks/javascript/README.md +1 -1
- data/tracks/javascript/docs/TESTS.md +9 -1
- data/tracks/kotlin/exercises/luhn/src/example/kotlin/Luhn.kt +18 -26
- data/tracks/kotlin/exercises/luhn/src/test/kotlin/LuhnTest.kt +40 -38
- data/tracks/php/README.md +1 -1
- data/tracks/php/config.json +5 -0
- data/tracks/php/exercises/perfect-numbers/example.php +23 -0
- data/tracks/php/exercises/perfect-numbers/perfect-numbers_test.php +99 -0
- data/tracks/purescript/.travis.yml +1 -0
- data/tracks/purescript/bin/test.sh +33 -8
- data/tracks/purescript/config.json +7 -0
- data/tracks/purescript/exercises/meetup/bower.json +17 -0
- data/tracks/purescript/exercises/meetup/examples/src/Meetup.purs +37 -0
- data/tracks/purescript/exercises/meetup/src/Meetup.purs +11 -0
- data/tracks/purescript/exercises/meetup/test/Main.purs +395 -0
- data/tracks/python/README.md +7 -6
- data/tracks/python/docs/TOOLS.md +3 -3
- data/tracks/python/exercises/bracket-push/bracket_push_test.py +32 -15
- data/tracks/python/exercises/hamming/hamming_test.py +2 -0
- data/tracks/python/exercises/luhn/luhn_test.py +2 -0
- data/tracks/python/test/check-exercises.py +7 -1
- metadata +56 -20
- data/tracks/csharp/exercises/atbash-cipher/AtbashTest.cs +0 -17
- data/tracks/csharp/generators/BooleanTestMethod.cs +0 -36
- data/tracks/csharp/generators/TestMethodNameTransformer.cs +0 -11
- data/tracks/csharp/generators/TestedClassNameTransformer.cs +0 -11
- data/tracks/java/exercises/allergies/src/main/java/.keep +0 -0
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trackler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.8.
|
4
|
+
version: 2.0.8.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Owen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -691,6 +691,13 @@ files:
|
|
691
691
|
- tracks/c/exercises/nth-prime/test/vendor/unity.c
|
692
692
|
- tracks/c/exercises/nth-prime/test/vendor/unity.h
|
693
693
|
- tracks/c/exercises/nth-prime/test/vendor/unity_internals.h
|
694
|
+
- tracks/c/exercises/nucleotide-count/makefile
|
695
|
+
- tracks/c/exercises/nucleotide-count/src/example.c
|
696
|
+
- tracks/c/exercises/nucleotide-count/src/example.h
|
697
|
+
- tracks/c/exercises/nucleotide-count/test/test_nucleotide_count.c
|
698
|
+
- tracks/c/exercises/nucleotide-count/test/vendor/unity.c
|
699
|
+
- tracks/c/exercises/nucleotide-count/test/vendor/unity.h
|
700
|
+
- tracks/c/exercises/nucleotide-count/test/vendor/unity_internals.h
|
694
701
|
- tracks/c/exercises/pangram/makefile
|
695
702
|
- tracks/c/exercises/pangram/src/example.c
|
696
703
|
- tracks/c/exercises/pangram/src/example.h
|
@@ -1353,6 +1360,7 @@ files:
|
|
1353
1360
|
- tracks/crystal/src/generator/spec/exercise_generator_spec.cr
|
1354
1361
|
- tracks/crystal/src/generator/spec/exercise_test_case_spec.cr
|
1355
1362
|
- tracks/csharp/.git
|
1363
|
+
- tracks/csharp/.gitattributes
|
1356
1364
|
- tracks/csharp/.gitignore
|
1357
1365
|
- tracks/csharp/.travis.yml
|
1358
1366
|
- tracks/csharp/LICENSE
|
@@ -1402,7 +1410,7 @@ files:
|
|
1402
1410
|
- tracks/csharp/exercises/anagram/Example.cs
|
1403
1411
|
- tracks/csharp/exercises/atbash-cipher/AtbashCipher.cs
|
1404
1412
|
- tracks/csharp/exercises/atbash-cipher/AtbashCipher.csproj
|
1405
|
-
- tracks/csharp/exercises/atbash-cipher/
|
1413
|
+
- tracks/csharp/exercises/atbash-cipher/AtbashCipherTest.cs
|
1406
1414
|
- tracks/csharp/exercises/atbash-cipher/Example.cs
|
1407
1415
|
- tracks/csharp/exercises/bank-account/BankAccount.cs
|
1408
1416
|
- tracks/csharp/exercises/bank-account/BankAccount.csproj
|
@@ -1697,6 +1705,7 @@ files:
|
|
1697
1705
|
- tracks/csharp/exercises/robot-simulator/RobotSimulator.csproj
|
1698
1706
|
- tracks/csharp/exercises/robot-simulator/RobotSimulatorTest.cs
|
1699
1707
|
- tracks/csharp/exercises/roman-numerals/Example.cs
|
1708
|
+
- tracks/csharp/exercises/roman-numerals/HINTS.md
|
1700
1709
|
- tracks/csharp/exercises/roman-numerals/RomanNumerals.cs
|
1701
1710
|
- tracks/csharp/exercises/roman-numerals/RomanNumerals.csproj
|
1702
1711
|
- tracks/csharp/exercises/roman-numerals/RomanNumeralsTest.cs
|
@@ -1798,6 +1807,7 @@ files:
|
|
1798
1807
|
- tracks/csharp/exercises/word-count/WordCount.csproj
|
1799
1808
|
- tracks/csharp/exercises/word-count/WordCountTest.cs
|
1800
1809
|
- tracks/csharp/exercises/word-search/Example.cs
|
1810
|
+
- tracks/csharp/exercises/word-search/HINTS.md
|
1801
1811
|
- tracks/csharp/exercises/word-search/WordSearch.cs
|
1802
1812
|
- tracks/csharp/exercises/word-search/WordSearch.csproj
|
1803
1813
|
- tracks/csharp/exercises/word-search/WordSearchTest.cs
|
@@ -1814,28 +1824,45 @@ files:
|
|
1814
1824
|
- tracks/csharp/exercises/zipper/Zipper.cs
|
1815
1825
|
- tracks/csharp/exercises/zipper/Zipper.csproj
|
1816
1826
|
- tracks/csharp/exercises/zipper/ZipperTest.cs
|
1817
|
-
- tracks/csharp/generators/
|
1818
|
-
- tracks/csharp/generators/
|
1819
|
-
- tracks/csharp/generators/
|
1820
|
-
- tracks/csharp/generators/
|
1821
|
-
- tracks/csharp/generators/
|
1822
|
-
- tracks/csharp/generators/
|
1823
|
-
- tracks/csharp/generators/
|
1827
|
+
- tracks/csharp/generators/Classes/TestClass.cs
|
1828
|
+
- tracks/csharp/generators/Classes/TestClassNameTransformer.cs
|
1829
|
+
- tracks/csharp/generators/Classes/TestClassRenderer.cs
|
1830
|
+
- tracks/csharp/generators/Classes/TestedClassNameTransformer.cs
|
1831
|
+
- tracks/csharp/generators/Data/CanonicalData.cs
|
1832
|
+
- tracks/csharp/generators/Data/CanonicalDataCase.cs
|
1833
|
+
- tracks/csharp/generators/Data/CanonicalDataCaseJsonConverter.cs
|
1834
|
+
- tracks/csharp/generators/Data/CanonicalDataCasesJsonConverter.cs
|
1835
|
+
- tracks/csharp/generators/Data/CanonicalDataParser.cs
|
1836
|
+
- tracks/csharp/generators/Data/ExerciseCollection.cs
|
1837
|
+
- tracks/csharp/generators/Exercises/AcronymExercise.cs
|
1838
|
+
- tracks/csharp/generators/Exercises/AtbashCipherExercise.cs
|
1839
|
+
- tracks/csharp/generators/Exercises/BooleanExercise.cs
|
1840
|
+
- tracks/csharp/generators/Exercises/EqualityExercise.cs
|
1824
1841
|
- tracks/csharp/generators/Exercises/Exercise.cs
|
1842
|
+
- tracks/csharp/generators/Exercises/IsogramExercise.cs
|
1825
1843
|
- tracks/csharp/generators/Exercises/LeapExercise.cs
|
1844
|
+
- tracks/csharp/generators/Exercises/NthPrimeExercise.cs
|
1845
|
+
- tracks/csharp/generators/Exercises/PerfectNumbersExercise.cs
|
1846
|
+
- tracks/csharp/generators/Exercises/PigLatinExercise.cs
|
1847
|
+
- tracks/csharp/generators/Exercises/RaindropsExercise.cs
|
1848
|
+
- tracks/csharp/generators/Exercises/RomanNumeralsExercise.cs
|
1826
1849
|
- tracks/csharp/generators/Generators.csproj
|
1827
1850
|
- tracks/csharp/generators/Generators.csproj.user
|
1828
1851
|
- tracks/csharp/generators/Generators.sln
|
1852
|
+
- tracks/csharp/generators/Helpers/StringExtensions.cs
|
1853
|
+
- tracks/csharp/generators/Helpers/To.cs
|
1854
|
+
- tracks/csharp/generators/Methods/BooleanTestMethodGenerator.cs
|
1855
|
+
- tracks/csharp/generators/Methods/EqualityTestMethodGenerator.cs
|
1856
|
+
- tracks/csharp/generators/Methods/ExceptionTestMethodGenerator.cs
|
1857
|
+
- tracks/csharp/generators/Methods/TestMethod.cs
|
1858
|
+
- tracks/csharp/generators/Methods/TestMethodData.cs
|
1859
|
+
- tracks/csharp/generators/Methods/TestMethodGenerator.cs
|
1860
|
+
- tracks/csharp/generators/Methods/TestMethodNameTransformer.cs
|
1861
|
+
- tracks/csharp/generators/Methods/TestMethodOptions.cs
|
1862
|
+
- tracks/csharp/generators/Methods/TestMethodRenderer.cs
|
1863
|
+
- tracks/csharp/generators/Methods/TestedMethodNameTransformer.cs
|
1864
|
+
- tracks/csharp/generators/Methods/TestedMethodType.cs
|
1829
1865
|
- tracks/csharp/generators/Program.cs
|
1830
|
-
- tracks/csharp/generators/TestClass.cs
|
1831
|
-
- tracks/csharp/generators/TestClassNameTransformer.cs
|
1832
|
-
- tracks/csharp/generators/TestClassRenderer.cs
|
1833
|
-
- tracks/csharp/generators/TestMethod.cs
|
1834
|
-
- tracks/csharp/generators/TestMethodNameTransformer.cs
|
1835
|
-
- tracks/csharp/generators/TestMethodRenderer.cs
|
1836
|
-
- tracks/csharp/generators/TestedClassNameTransformer.cs
|
1837
|
-
- tracks/csharp/generators/TestedMethodNameTransformer.cs
|
1838
|
-
- tracks/csharp/generators/To.cs
|
1839
1866
|
- tracks/csharp/generators/generate.ps1
|
1840
1867
|
- tracks/csharp/generators/generate.sh
|
1841
1868
|
- tracks/csharp/img/icon.png
|
@@ -2414,6 +2441,10 @@ files:
|
|
2414
2441
|
- tracks/elixir/exercises/difference-of-squares/difference_of_squares.exs
|
2415
2442
|
- tracks/elixir/exercises/difference-of-squares/difference_of_squares_test.exs
|
2416
2443
|
- tracks/elixir/exercises/difference-of-squares/example.exs
|
2444
|
+
- tracks/elixir/exercises/diffie-hellman/HINTS.md
|
2445
|
+
- tracks/elixir/exercises/diffie-hellman/diffie_hellman.exs
|
2446
|
+
- tracks/elixir/exercises/diffie-hellman/diffie_hellman_test.exs
|
2447
|
+
- tracks/elixir/exercises/diffie-hellman/example.exs
|
2417
2448
|
- tracks/elixir/exercises/dot-dsl/dot.exs
|
2418
2449
|
- tracks/elixir/exercises/dot-dsl/dot_dsl_test.exs
|
2419
2450
|
- tracks/elixir/exercises/dot-dsl/example.exs
|
@@ -4175,7 +4206,6 @@ files:
|
|
4175
4206
|
- tracks/java/exercises/allergies/build.gradle
|
4176
4207
|
- tracks/java/exercises/allergies/src/example/java/Allergen.java
|
4177
4208
|
- tracks/java/exercises/allergies/src/example/java/Allergies.java
|
4178
|
-
- tracks/java/exercises/allergies/src/main/java/.keep
|
4179
4209
|
- tracks/java/exercises/allergies/src/main/java/Allergen.java
|
4180
4210
|
- tracks/java/exercises/allergies/src/test/java/AllergiesTest.java
|
4181
4211
|
- tracks/java/exercises/anagram/build.gradle
|
@@ -6230,6 +6260,8 @@ files:
|
|
6230
6260
|
- tracks/php/exercises/ocr-numbers/ocr-numbers_test.php
|
6231
6261
|
- tracks/php/exercises/pangram/example.php
|
6232
6262
|
- tracks/php/exercises/pangram/pangram_test.php
|
6263
|
+
- tracks/php/exercises/perfect-numbers/example.php
|
6264
|
+
- tracks/php/exercises/perfect-numbers/perfect-numbers_test.php
|
6233
6265
|
- tracks/php/exercises/phone-number/example.php
|
6234
6266
|
- tracks/php/exercises/phone-number/phone-number_test.php
|
6235
6267
|
- tracks/php/exercises/pig-latin/example.php
|
@@ -6436,6 +6468,10 @@ files:
|
|
6436
6468
|
- tracks/purescript/exercises/leap/examples/src/Leap.purs
|
6437
6469
|
- tracks/purescript/exercises/leap/src/Leap.purs
|
6438
6470
|
- tracks/purescript/exercises/leap/test/Main.purs
|
6471
|
+
- tracks/purescript/exercises/meetup/bower.json
|
6472
|
+
- tracks/purescript/exercises/meetup/examples/src/Meetup.purs
|
6473
|
+
- tracks/purescript/exercises/meetup/src/Meetup.purs
|
6474
|
+
- tracks/purescript/exercises/meetup/test/Main.purs
|
6439
6475
|
- tracks/purescript/exercises/pangram/bower.json
|
6440
6476
|
- tracks/purescript/exercises/pangram/examples/src/Pangram.purs
|
6441
6477
|
- tracks/purescript/exercises/pangram/src/Pangram.purs
|
@@ -1,17 +0,0 @@
|
|
1
|
-
using Xunit;
|
2
|
-
|
3
|
-
public class AtbashTest
|
4
|
-
{
|
5
|
-
[Theory]
|
6
|
-
[InlineData("no", "ml")]
|
7
|
-
[InlineData("yes", "bvh")]
|
8
|
-
[InlineData("OMG", "lnt")]
|
9
|
-
[InlineData("mindblowingly", "nrmwy oldrm tob")]
|
10
|
-
[InlineData("Testing, 1 2 3, testing.", "gvhgr mt123 gvhgr mt")]
|
11
|
-
[InlineData("Truth is fiction.", "gifgs rhurx grlm")]
|
12
|
-
[InlineData("The quick brown fox jumps over the lazy dog.", "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt")]
|
13
|
-
public void Encodes_words_using_atbash_cipher(string words, string expected)
|
14
|
-
{
|
15
|
-
Assert.Equal(expected, Atbash.Encode(words));
|
16
|
-
}
|
17
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
using System;
|
2
|
-
using Humanizer;
|
3
|
-
|
4
|
-
namespace Generators
|
5
|
-
{
|
6
|
-
public class BooleanTestMethod : TestMethod
|
7
|
-
{
|
8
|
-
public BooleanTestMethod(CanonicalData canonicalData, CanonicalDataCase canonicalDataCase, int index)
|
9
|
-
{
|
10
|
-
Index = index;
|
11
|
-
MethodName = GetMethodName(canonicalDataCase);
|
12
|
-
Body = GetBody(canonicalData, canonicalDataCase);
|
13
|
-
}
|
14
|
-
|
15
|
-
private static string GetMethodName(CanonicalDataCase canonicalDataCase)
|
16
|
-
=> canonicalDataCase.Description.Replace(":", " is").Transform(To.TestMethodName);
|
17
|
-
|
18
|
-
private static string GetBody(CanonicalData canonicalData, CanonicalDataCase canonicalDataCase)
|
19
|
-
{
|
20
|
-
var isTrue = Convert.ToBoolean(canonicalDataCase.Expected);
|
21
|
-
var testedClassName = GetTestedClassName(canonicalData);
|
22
|
-
var testedMethod = GetTestedMethod(canonicalDataCase);
|
23
|
-
|
24
|
-
return $"Assert.{isTrue}({testedClassName}.{testedMethod}({canonicalDataCase.Input}));";
|
25
|
-
}
|
26
|
-
|
27
|
-
private static string GetTestedClassName(CanonicalData canonicalData)
|
28
|
-
=> canonicalData.Exercise.Transform(To.TestedClassName);
|
29
|
-
|
30
|
-
private static string GetTestedMethod(CanonicalDataCase canonicalDataCase)
|
31
|
-
{
|
32
|
-
var testedMethod = canonicalDataCase.Property.Transform(To.TestedMethodName);
|
33
|
-
return testedMethod.StartsWith("Is") ? testedMethod : "Is" + testedMethod;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
using System.Text.RegularExpressions;
|
2
|
-
using Humanizer;
|
3
|
-
|
4
|
-
namespace Generators
|
5
|
-
{
|
6
|
-
public class TestMethodNameTransformer : IStringTransformer
|
7
|
-
{
|
8
|
-
public string Transform(string input)
|
9
|
-
=> Regex.Replace(input, @"[^\w]+", "_", RegexOptions.Compiled).Underscore().Transform(Humanizer.To.TitleCase);
|
10
|
-
}
|
11
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
using System.Text.RegularExpressions;
|
2
|
-
using Humanizer;
|
3
|
-
|
4
|
-
namespace Generators
|
5
|
-
{
|
6
|
-
public class TestedClassNameTransformer : IStringTransformer
|
7
|
-
{
|
8
|
-
public string Transform(string input)
|
9
|
-
=> Regex.Replace(input, @"[^\w]+", "", RegexOptions.Compiled).Underscore().Transform(Humanizer.To.TitleCase);
|
10
|
-
}
|
11
|
-
}
|
File without changes
|