From 0ab25a0a1dc2051a68576747f790ed346973312d Mon Sep 17 00:00:00 2001 From: kesac Date: Sat, 6 Jan 2024 19:40:17 -0700 Subject: [PATCH] Removed unused unit test methods: - Removed output space helper methods from SyllableGeneratorTests - The unit tests that were using them were split into smaller, simpler tests that no longer need them --- .../Syllabore.Tests/SyllableGeneratorTests.cs | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/Syllabore/Syllabore.Tests/SyllableGeneratorTests.cs b/Syllabore/Syllabore.Tests/SyllableGeneratorTests.cs index a7ec6b6..12d987b 100644 --- a/Syllabore/Syllabore.Tests/SyllableGeneratorTests.cs +++ b/Syllabore/Syllabore.Tests/SyllableGeneratorTests.cs @@ -45,71 +45,6 @@ private static SyllableGenerator GetConsonantOnlyGenerator() .WithTrailingConsonantSequences("bbbb", "bbbbb"); } - /// - /// Helper method to check that the output of a provider never contains - /// any of the specified substrings. - /// - private bool EachOutputNeverContainsAnyOf(SyllableGenerator p, params string[] invalidSubstrings) - { - bool outputNeverAppears = true; - for (int i = 0; i < 1000; i++) - { - var s = p.NextSyllable(); - if (s.ContainsAny(invalidSubstrings)) - { - outputNeverAppears = false; - break; - } - } - - return outputNeverAppears; - } - - /// - /// Helper method to check that the output of a provider always contains at least one - /// instance of any of the specified substrings. - /// - private bool EachOutputContainsAnyOf(SyllableGenerator p, params string[] validSubstrings) - { - bool outputAlwaysAppears = true; - for (int i = 0; i < 1000; i++) - { - var s = p.NextSyllable(); - if (!s.ContainsAny(validSubstrings)) - { - outputAlwaysAppears = false; - break; - } - } - - return outputAlwaysAppears; - } - - /// - /// Helper method to check that the output of a provider always contains at least one - /// instance of all of the specified substrings. - /// - private bool AllOutputContainsAtLeastOnce(SyllableGenerator p, params string[] validSubstrings) - { - bool[] substringAppeared = new bool[validSubstrings.Length]; - - for (int i = 0; i < 1000; i++) - { - var s = p.NextSyllable(); - - for (int j = 0; j < validSubstrings.Length; j++) - { - if (s.Contains(validSubstrings[j])) - { - substringAppeared[j] = true; - } - } - } - - return substringAppeared.All(x => x); - - } - [TestMethod] public void SyllableGenerator_NoGraphemes_StartingSyllableGenerationThrowsException() {