diff --git a/Algorithms.Tests/Compressors/BurrowsWheelerTransformTests.cs b/Algorithms.Tests/Compressors/BurrowsWheelerTransformTests.cs index 96d4fdcc..ca671f79 100644 --- a/Algorithms.Tests/Compressors/BurrowsWheelerTransformTests.cs +++ b/Algorithms.Tests/Compressors/BurrowsWheelerTransformTests.cs @@ -1,6 +1,4 @@ using Algorithms.DataCompression; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Compressors; diff --git a/Algorithms.Tests/Compressors/HuffmanCompressorTests.cs b/Algorithms.Tests/Compressors/HuffmanCompressorTests.cs index 58a45a28..81bfb0d1 100644 --- a/Algorithms.Tests/Compressors/HuffmanCompressorTests.cs +++ b/Algorithms.Tests/Compressors/HuffmanCompressorTests.cs @@ -1,8 +1,5 @@ using Algorithms.DataCompression; using Algorithms.Sorters.Comparison; -using FluentAssertions; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Compressors; diff --git a/Algorithms.Tests/Compressors/ShannonFanoCompressorTests.cs b/Algorithms.Tests/Compressors/ShannonFanoCompressorTests.cs index 837dbefa..545c2d7a 100644 --- a/Algorithms.Tests/Compressors/ShannonFanoCompressorTests.cs +++ b/Algorithms.Tests/Compressors/ShannonFanoCompressorTests.cs @@ -1,7 +1,5 @@ using Algorithms.DataCompression; using Algorithms.Knapsack; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Compressors; diff --git a/Algorithms.Tests/Compressors/TranslatorTests.cs b/Algorithms.Tests/Compressors/TranslatorTests.cs index c2653a2a..9d8d708a 100644 --- a/Algorithms.Tests/Compressors/TranslatorTests.cs +++ b/Algorithms.Tests/Compressors/TranslatorTests.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; using Algorithms.DataCompression; -using NUnit.Framework; namespace Algorithms.Tests.Compressors; diff --git a/Algorithms.Tests/Crypto/Digests/AsconDigestTests.cs b/Algorithms.Tests/Crypto/Digests/AsconDigestTests.cs index bd83f2dd..11d5fe5f 100644 --- a/Algorithms.Tests/Crypto/Digests/AsconDigestTests.cs +++ b/Algorithms.Tests/Crypto/Digests/AsconDigestTests.cs @@ -1,9 +1,5 @@ -using System; -using System.Text; using Algorithms.Crypto.Digests; using Algorithms.Crypto.Exceptions; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Crypto.Digests; diff --git a/Algorithms.Tests/Crypto/Digests/Md2DigestTests.cs b/Algorithms.Tests/Crypto/Digests/Md2DigestTests.cs index 818ebe10..69bd29f2 100644 --- a/Algorithms.Tests/Crypto/Digests/Md2DigestTests.cs +++ b/Algorithms.Tests/Crypto/Digests/Md2DigestTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Text; -using Algorithms.Crypto.Digests; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Crypto.Digests; namespace Algorithms.Tests.Crypto.Digesters; diff --git a/Algorithms.Tests/Crypto/Exceptions/CryptoExceptionTests.cs b/Algorithms.Tests/Crypto/Exceptions/CryptoExceptionTests.cs index dc43c741..2963a734 100644 --- a/Algorithms.Tests/Crypto/Exceptions/CryptoExceptionTests.cs +++ b/Algorithms.Tests/Crypto/Exceptions/CryptoExceptionTests.cs @@ -1,8 +1,4 @@ using Algorithms.Crypto.Exceptions; -using NUnit.Framework; -using FluentAssertions; -using System; - namespace Algorithms.Tests.Crypto.Exceptions { diff --git a/Algorithms.Tests/Crypto/Exceptions/DataLengthExceptionTests.cs b/Algorithms.Tests/Crypto/Exceptions/DataLengthExceptionTests.cs index e792d4cb..947c88c5 100644 --- a/Algorithms.Tests/Crypto/Exceptions/DataLengthExceptionTests.cs +++ b/Algorithms.Tests/Crypto/Exceptions/DataLengthExceptionTests.cs @@ -1,6 +1,3 @@ -using NUnit.Framework; -using FluentAssertions; -using System; using Algorithms.Crypto.Exceptions; namespace Algorithms.Tests.Crypto.Exceptions diff --git a/Algorithms.Tests/Crypto/Exceptions/OutputLengthExceptionTests.cs b/Algorithms.Tests/Crypto/Exceptions/OutputLengthExceptionTests.cs index 313b95ad..adac6e9c 100644 --- a/Algorithms.Tests/Crypto/Exceptions/OutputLengthExceptionTests.cs +++ b/Algorithms.Tests/Crypto/Exceptions/OutputLengthExceptionTests.cs @@ -1,6 +1,3 @@ -using NUnit.Framework; -using FluentAssertions; -using System; using Algorithms.Crypto.Exceptions; namespace Algorithms.Tests.Crypto.Exceptions diff --git a/Algorithms.Tests/Crypto/Paddings/Iso10126D2PaddingTests.cs b/Algorithms.Tests/Crypto/Paddings/Iso10126D2PaddingTests.cs index e5aae6d4..8d8aa15a 100644 --- a/Algorithms.Tests/Crypto/Paddings/Iso10126D2PaddingTests.cs +++ b/Algorithms.Tests/Crypto/Paddings/Iso10126D2PaddingTests.cs @@ -1,7 +1,4 @@ -using System; -using Algorithms.Crypto.Paddings; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Crypto.Paddings; namespace Algorithms.Tests.Crypto.Paddings; diff --git a/Algorithms.Tests/Crypto/Paddings/Iso7816D4PaddingTests.cs b/Algorithms.Tests/Crypto/Paddings/Iso7816D4PaddingTests.cs index 9e0e99ac..57e9c74a 100644 --- a/Algorithms.Tests/Crypto/Paddings/Iso7816D4PaddingTests.cs +++ b/Algorithms.Tests/Crypto/Paddings/Iso7816D4PaddingTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; -using Algorithms.Crypto.Paddings; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Crypto.Paddings; namespace Algorithms.Tests.Crypto.Paddings; diff --git a/Algorithms.Tests/Crypto/Paddings/Pkcs7PaddingTests.cs b/Algorithms.Tests/Crypto/Paddings/Pkcs7PaddingTests.cs index 40454a63..3050a339 100644 --- a/Algorithms.Tests/Crypto/Paddings/Pkcs7PaddingTests.cs +++ b/Algorithms.Tests/Crypto/Paddings/Pkcs7PaddingTests.cs @@ -1,7 +1,4 @@ -using System; -using Algorithms.Crypto.Paddings; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Crypto.Paddings; namespace Algorithms.Tests.Crypto.Paddings; diff --git a/Algorithms.Tests/Crypto/Paddings/TbcPaddingTests.cs b/Algorithms.Tests/Crypto/Paddings/TbcPaddingTests.cs index c8779e86..056955fb 100644 --- a/Algorithms.Tests/Crypto/Paddings/TbcPaddingTests.cs +++ b/Algorithms.Tests/Crypto/Paddings/TbcPaddingTests.cs @@ -1,7 +1,4 @@ -using System; -using Algorithms.Crypto.Paddings; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Crypto.Paddings; namespace Algorithms.Tests.Crypto.Paddings; @@ -18,7 +15,7 @@ public void AddPadding_WhenInputOffsetIsZero_ShouldPadWithLastBit() var result = padding.AddPadding(input, inputOffset); result.Should().Be(4); - input.Should().BeEquivalentTo(new byte[]{0xff, 0xff, 0xff, 0xff}); + input.Should().BeEquivalentTo(new byte[] { 0xff, 0xff, 0xff, 0xff }); } [Test] diff --git a/Algorithms.Tests/Crypto/Paddings/X932PaddingTests.cs b/Algorithms.Tests/Crypto/Paddings/X932PaddingTests.cs index 22e7daf4..9776e9bc 100644 --- a/Algorithms.Tests/Crypto/Paddings/X932PaddingTests.cs +++ b/Algorithms.Tests/Crypto/Paddings/X932PaddingTests.cs @@ -1,7 +1,4 @@ -using System; -using Algorithms.Crypto.Paddings; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Crypto.Paddings; namespace Algorithms.Tests.Crypto.Paddings; diff --git a/Algorithms.Tests/Crypto/Utils/ByteEncodingUtils.cs b/Algorithms.Tests/Crypto/Utils/ByteEncodingUtils.cs index ef04168d..c8d5081b 100644 --- a/Algorithms.Tests/Crypto/Utils/ByteEncodingUtils.cs +++ b/Algorithms.Tests/Crypto/Utils/ByteEncodingUtils.cs @@ -1,6 +1,3 @@ -using NUnit.Framework; -using FluentAssertions; -using System; using Algorithms.Crypto.Utils; namespace Algorithms.Tests.Crypto.Utils diff --git a/Algorithms.Tests/Crypto/Utils/LongUtilsTests.cs b/Algorithms.Tests/Crypto/Utils/LongUtilsTests.cs index cc2029bc..96dd95c7 100644 --- a/Algorithms.Tests/Crypto/Utils/LongUtilsTests.cs +++ b/Algorithms.Tests/Crypto/Utils/LongUtilsTests.cs @@ -1,5 +1,3 @@ -using NUnit.Framework; -using FluentAssertions; using Algorithms.Crypto.Utils; namespace Algorithms.Tests.Crypto.Utils diff --git a/Algorithms.Tests/Crypto/Utils/ValidationUtilsTests.cs b/Algorithms.Tests/Crypto/Utils/ValidationUtilsTests.cs index f109fcda..5f82b277 100644 --- a/Algorithms.Tests/Crypto/Utils/ValidationUtilsTests.cs +++ b/Algorithms.Tests/Crypto/Utils/ValidationUtilsTests.cs @@ -1,6 +1,3 @@ -using NUnit.Framework; -using FluentAssertions; -using System; using Algorithms.Crypto.Utils; using Algorithms.Crypto.Exceptions; diff --git a/Algorithms.Tests/Encoders/AutokeyEncoderTests.cs b/Algorithms.Tests/Encoders/AutokeyEncoderTests.cs index 0613e1c6..e1ea9752 100644 --- a/Algorithms.Tests/Encoders/AutokeyEncoderTests.cs +++ b/Algorithms.Tests/Encoders/AutokeyEncoderTests.cs @@ -1,7 +1,4 @@ -using System; using Algorithms.Encoders; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Encoders { diff --git a/Algorithms.Tests/Encoders/BlowfishEncoderTests.cs b/Algorithms.Tests/Encoders/BlowfishEncoderTests.cs index 4520e616..b2ef6c37 100644 --- a/Algorithms.Tests/Encoders/BlowfishEncoderTests.cs +++ b/Algorithms.Tests/Encoders/BlowfishEncoderTests.cs @@ -1,6 +1,4 @@ using Algorithms.Encoders; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Encoders; diff --git a/Algorithms.Tests/Encoders/CaesarEncoderTests.cs b/Algorithms.Tests/Encoders/CaesarEncoderTests.cs index d6564d35..3ee709f5 100644 --- a/Algorithms.Tests/Encoders/CaesarEncoderTests.cs +++ b/Algorithms.Tests/Encoders/CaesarEncoderTests.cs @@ -1,6 +1,4 @@ using Algorithms.Encoders; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Encoders; diff --git a/Algorithms.Tests/Encoders/FeistelCipherTest.cs b/Algorithms.Tests/Encoders/FeistelCipherTest.cs index e5199093..f1b8d88f 100644 --- a/Algorithms.Tests/Encoders/FeistelCipherTest.cs +++ b/Algorithms.Tests/Encoders/FeistelCipherTest.cs @@ -1,7 +1,4 @@ using Algorithms.Encoders; -using NUnit.Framework; -using NUnit.Framework.Internal; -using System; namespace Algorithms.Tests.Encoders; @@ -26,10 +23,10 @@ public static void DecodedStringIsTheSame([Random(100)] uint key) Assert.That(decoded, Is.EqualTo(message)); } - [TestCase("00001111", (uint)0x12345678)] - [TestCase("00001111222233334444555566667", (uint)0x12345678)] - [TestCase("000011112222333344445555666677", (uint)0x12345678)] - [TestCase("0000111122223333444455556666777", (uint)0x12345678)] + [TestCase("00001111", (uint)0x12345678)] + [TestCase("00001111222233334444555566667", (uint)0x12345678)] + [TestCase("000011112222333344445555666677", (uint)0x12345678)] + [TestCase("0000111122223333444455556666777", (uint)0x12345678)] // The plain text will be padded to fill the size of block (16 bytes), so the encoded message should be aligned with the rule // (text.Length % 16 == 0) public static void TestEncodedMessageSize(string testCase, uint key) diff --git a/Algorithms.Tests/Encoders/HillEnconderTests.cs b/Algorithms.Tests/Encoders/HillEnconderTests.cs index 359a4cb4..916c8046 100644 --- a/Algorithms.Tests/Encoders/HillEnconderTests.cs +++ b/Algorithms.Tests/Encoders/HillEnconderTests.cs @@ -1,6 +1,4 @@ using Algorithms.Encoders; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Encoders; diff --git a/Algorithms.Tests/Encoders/NysiisEncoderTests.cs b/Algorithms.Tests/Encoders/NysiisEncoderTests.cs index b8f8ddcc..f1ff9b78 100644 --- a/Algorithms.Tests/Encoders/NysiisEncoderTests.cs +++ b/Algorithms.Tests/Encoders/NysiisEncoderTests.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Linq; using Algorithms.Encoders; -using NUnit.Framework; namespace Algorithms.Tests.Encoders; diff --git a/Algorithms.Tests/Encoders/SoundexEncoderTest.cs b/Algorithms.Tests/Encoders/SoundexEncoderTest.cs index 8bb7fde4..d8f534fd 100644 --- a/Algorithms.Tests/Encoders/SoundexEncoderTest.cs +++ b/Algorithms.Tests/Encoders/SoundexEncoderTest.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Linq; using Algorithms.Encoders; -using NUnit.Framework; namespace Algorithms.Tests.Encoders; diff --git a/Algorithms.Tests/Encoders/VigenereEncoderTests.cs b/Algorithms.Tests/Encoders/VigenereEncoderTests.cs index 4765ec23..254e65ae 100644 --- a/Algorithms.Tests/Encoders/VigenereEncoderTests.cs +++ b/Algorithms.Tests/Encoders/VigenereEncoderTests.cs @@ -1,7 +1,4 @@ -using System; using Algorithms.Encoders; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Encoders; diff --git a/Algorithms.Tests/Financial/PresentValueTests.cs b/Algorithms.Tests/Financial/PresentValueTests.cs index bf2dcaea..134d9983 100644 --- a/Algorithms.Tests/Financial/PresentValueTests.cs +++ b/Algorithms.Tests/Financial/PresentValueTests.cs @@ -1,20 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; using Algorithms.Financial; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Financial; public static class PresentValueTests { - [TestCase(0.13,new[] { 10.0, 20.70, -293.0, 297.0 },4.69)] - [TestCase(0.07,new[] { -109129.39, 30923.23, 15098.93, 29734.0, 39.0 }, -42739.63)] + [TestCase(0.13, new[] { 10.0, 20.70, -293.0, 297.0 }, 4.69)] + [TestCase(0.07, new[] { -109129.39, 30923.23, 15098.93, 29734.0, 39.0 }, -42739.63)] [TestCase(0.07, new[] { 109129.39, 30923.23, 15098.93, 29734.0, 39.0 }, 175519.15)] [TestCase(0.0, new[] { 109129.39, 30923.23, 15098.93, 29734.0, 39.0 }, 184924.55)] - public static void Present_Value_General_Tests(double discountRate,double[] cashFlow ,double expected) + public static void Present_Value_General_Tests(double discountRate, double[] cashFlow, double expected) => PresentValue.Calculate(discountRate, cashFlow.ToList()) .Should() @@ -22,7 +17,7 @@ public static void Present_Value_General_Tests(double discountRate,double[] cash [TestCase(-1.0, new[] { 10.0, 20.70, -293.0, 297.0 })] - [TestCase(1.0,new double[] {})] + [TestCase(1.0, new double[] { })] public static void Present_Value_Exception_Tests(double discountRate, double[] cashFlow) => Assert.Throws(() => PresentValue.Calculate(discountRate, cashFlow.ToList())); diff --git a/Algorithms.Tests/GlobalUsings.cs b/Algorithms.Tests/GlobalUsings.cs new file mode 100644 index 00000000..3092bb44 --- /dev/null +++ b/Algorithms.Tests/GlobalUsings.cs @@ -0,0 +1,21 @@ +// ----------------------------------------------------------------------------- +// Global using directives for the C-Sharp solution. +// These namespaces are imported globally so they don’t need to be repeatedly declared +// in individual files, improving readability and reducing boilerplate. +// +// Guidelines: +// - Keep only the most commonly used namespaces here. +// - Add project-specific namespaces (e.g., Utilities.Extensions) only if they are +// required across the majority of files in the project. +// - Avoid placing rarely used namespaces here to maintain clarity. +// ----------------------------------------------------------------------------- + +global using System; // Core base classes and fundamental types +global using System.Collections.Generic; // Generic collection types (List, Dictionary, etc.) +global using System.Linq; // LINQ query operators for collections +global using System.Numerics; // Numeric types such as BigInteger and Complex +global using System.Text; // Text encoding, StringBuilder, etc. +global using Utilities.Extensions; // Common extension methods used across the solution +global using NUnit.Framework; // Testing framework providing attributes and assertions for test cases +global using NUnit.Framework.Internal; // Internal NUnit infrastructure (test context, utilities) — generally used for advanced or framework-level test control +global using FluentAssertions; // Assertion library for more readable and expressive unit tests diff --git a/Algorithms.Tests/Graph/BellmanFordTests.cs b/Algorithms.Tests/Graph/BellmanFordTests.cs index 80d6e01e..592639db 100644 --- a/Algorithms.Tests/Graph/BellmanFordTests.cs +++ b/Algorithms.Tests/Graph/BellmanFordTests.cs @@ -1,9 +1,5 @@ using Algorithms.Graph; using DataStructures.Graph; -using NUnit.Framework; -using FluentAssertions; -using System.Collections.Generic; -using System; namespace Algorithms.Tests.Graph; diff --git a/Algorithms.Tests/Graph/BreadthFirstSearchTests.cs b/Algorithms.Tests/Graph/BreadthFirstSearchTests.cs index 136104c7..6df799bf 100644 --- a/Algorithms.Tests/Graph/BreadthFirstSearchTests.cs +++ b/Algorithms.Tests/Graph/BreadthFirstSearchTests.cs @@ -1,7 +1,5 @@ using Algorithms.Graph; using DataStructures.Graph; -using NUnit.Framework; -using System.Collections.Generic; namespace Algorithms.Tests.Graph; diff --git a/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs index 9cfcc80e..26b32bc0 100644 --- a/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs +++ b/Algorithms.Tests/Graph/BreadthFirstTreeTraversalTests.cs @@ -1,6 +1,5 @@ using Algorithms.Graph; using DataStructures.BinarySearchTree; -using NUnit.Framework; namespace Algorithms.Tests.Graph; diff --git a/Algorithms.Tests/Graph/DepthFirstSearchTests.cs b/Algorithms.Tests/Graph/DepthFirstSearchTests.cs index fe48adb3..94d41c28 100644 --- a/Algorithms.Tests/Graph/DepthFirstSearchTests.cs +++ b/Algorithms.Tests/Graph/DepthFirstSearchTests.cs @@ -1,7 +1,5 @@ using Algorithms.Graph; using DataStructures.Graph; -using NUnit.Framework; -using System.Collections.Generic; namespace Algorithms.Tests.Graph; diff --git a/Algorithms.Tests/Graph/Dijkstra/DijkstraTests.cs b/Algorithms.Tests/Graph/Dijkstra/DijkstraTests.cs index e61778bb..9c33d424 100644 --- a/Algorithms.Tests/Graph/Dijkstra/DijkstraTests.cs +++ b/Algorithms.Tests/Graph/Dijkstra/DijkstraTests.cs @@ -1,8 +1,5 @@ -using System; using Algorithms.Graph.Dijkstra; using DataStructures.Graph; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Graph.Dijkstra; diff --git a/Algorithms.Tests/Graph/FloydWarshallTests.cs b/Algorithms.Tests/Graph/FloydWarshallTests.cs index 1440cd0f..3cd06669 100644 --- a/Algorithms.Tests/Graph/FloydWarshallTests.cs +++ b/Algorithms.Tests/Graph/FloydWarshallTests.cs @@ -1,7 +1,5 @@ using Algorithms.Graph; using DataStructures.Graph; -using NUnit.Framework; -using FluentAssertions; namespace Algorithms.Tests.Graph; diff --git a/Algorithms.Tests/Graph/KosarajuTests.cs b/Algorithms.Tests/Graph/KosarajuTests.cs index a4b61f61..c24b576d 100644 --- a/Algorithms.Tests/Graph/KosarajuTests.cs +++ b/Algorithms.Tests/Graph/KosarajuTests.cs @@ -1,9 +1,5 @@ using Algorithms.Graph; using DataStructures.Graph; -using NUnit.Framework; -using FluentAssertions; -using System.Collections.Generic; -using System.Linq; namespace Algorithms.Tests.Graph; @@ -34,7 +30,7 @@ public void GetRepresentativesTest() graph.AddEdge(vertex5, vertex6, 1); // Run the agorithm and obtain the representative vertex of the SCC to which each vertex belongs. - Dictionary,Vertex> result = Kosaraju.GetRepresentatives(graph); + Dictionary, Vertex> result = Kosaraju.GetRepresentatives(graph); // Check every Vertex belongs to a SCC result.Should().ContainKey(vertex1); diff --git a/Algorithms.Tests/Graph/MinimumSpanningTree/KruskalTests.cs b/Algorithms.Tests/Graph/MinimumSpanningTree/KruskalTests.cs index b1a4bbb3..4e3fbd9d 100644 --- a/Algorithms.Tests/Graph/MinimumSpanningTree/KruskalTests.cs +++ b/Algorithms.Tests/Graph/MinimumSpanningTree/KruskalTests.cs @@ -1,9 +1,4 @@ using Algorithms.Graph.MinimumSpanningTree; -using FluentAssertions; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; namespace Algorithms.Tests.Graph.MinimumSpanningTree; diff --git a/Algorithms.Tests/Graph/MinimumSpanningTree/PrimMatrixTests.cs b/Algorithms.Tests/Graph/MinimumSpanningTree/PrimMatrixTests.cs index c9b7521f..2d735e46 100644 --- a/Algorithms.Tests/Graph/MinimumSpanningTree/PrimMatrixTests.cs +++ b/Algorithms.Tests/Graph/MinimumSpanningTree/PrimMatrixTests.cs @@ -1,8 +1,4 @@ using Algorithms.Graph.MinimumSpanningTree; -using FluentAssertions; -using NUnit.Framework; -using System; -using System.Linq; namespace Algorithms.Tests.Graph.MinimumSpanningTree; diff --git a/Algorithms.Tests/Helpers/IntComparer.cs b/Algorithms.Tests/Helpers/IntComparer.cs index cc7e3928..3a0d1eec 100644 --- a/Algorithms.Tests/Helpers/IntComparer.cs +++ b/Algorithms.Tests/Helpers/IntComparer.cs @@ -1,5 +1,3 @@ -using System.Collections.Generic; - namespace Algorithms.Tests.Helpers; internal class IntComparer : IComparer diff --git a/Algorithms.Tests/Helpers/RandomHelper.cs b/Algorithms.Tests/Helpers/RandomHelper.cs index d55eddf9..a0180b4d 100644 --- a/Algorithms.Tests/Helpers/RandomHelper.cs +++ b/Algorithms.Tests/Helpers/RandomHelper.cs @@ -1,5 +1,3 @@ -using NUnit.Framework; - namespace Algorithms.Tests.Helpers; internal static class RandomHelper diff --git a/Algorithms.Tests/Knapsack/BranchAndBoundKnapsackSolverTests.cs b/Algorithms.Tests/Knapsack/BranchAndBoundKnapsackSolverTests.cs index a4159984..0bf2a5b3 100644 --- a/Algorithms.Tests/Knapsack/BranchAndBoundKnapsackSolverTests.cs +++ b/Algorithms.Tests/Knapsack/BranchAndBoundKnapsackSolverTests.cs @@ -1,7 +1,4 @@ -using System; using Algorithms.Knapsack; -using NUnit.Framework; -using FluentAssertions; namespace Algorithms.Tests.Knapsack; diff --git a/Algorithms.Tests/Knapsack/DynamicProgrammingKnapsackSolverTests.cs b/Algorithms.Tests/Knapsack/DynamicProgrammingKnapsackSolverTests.cs index a2b69f31..2c1adaa7 100644 --- a/Algorithms.Tests/Knapsack/DynamicProgrammingKnapsackSolverTests.cs +++ b/Algorithms.Tests/Knapsack/DynamicProgrammingKnapsackSolverTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Linq; using Algorithms.Knapsack; -using NUnit.Framework; namespace Algorithms.Tests.Knapsack; diff --git a/Algorithms.Tests/Knapsack/NaiveKnapsackSolverTests.cs b/Algorithms.Tests/Knapsack/NaiveKnapsackSolverTests.cs index d67ae0bb..5260313d 100644 --- a/Algorithms.Tests/Knapsack/NaiveKnapsackSolverTests.cs +++ b/Algorithms.Tests/Knapsack/NaiveKnapsackSolverTests.cs @@ -1,6 +1,4 @@ -using System.Linq; using Algorithms.Knapsack; -using NUnit.Framework; namespace Algorithms.Tests.Knapsack; diff --git a/Algorithms.Tests/LinearAlgebra/Distances/ChebyshevTests.cs b/Algorithms.Tests/LinearAlgebra/Distances/ChebyshevTests.cs index 2a5ca6e9..9a8e121f 100644 --- a/Algorithms.Tests/LinearAlgebra/Distances/ChebyshevTests.cs +++ b/Algorithms.Tests/LinearAlgebra/Distances/ChebyshevTests.cs @@ -1,7 +1,4 @@ -using NUnit.Framework; using Algorithms.LinearAlgebra.Distances; -using FluentAssertions; -using System; namespace Algorithms.Tests.LinearAlgebra.Distances; diff --git a/Algorithms.Tests/LinearAlgebra/Distances/EuclideanTests.cs b/Algorithms.Tests/LinearAlgebra/Distances/EuclideanTests.cs index 50ace3ad..068dd1d6 100644 --- a/Algorithms.Tests/LinearAlgebra/Distances/EuclideanTests.cs +++ b/Algorithms.Tests/LinearAlgebra/Distances/EuclideanTests.cs @@ -1,7 +1,4 @@ -using NUnit.Framework; using Algorithms.LinearAlgebra.Distances; -using FluentAssertions; -using System; namespace Algorithms.Tests.LinearAlgebra.Distances; diff --git a/Algorithms.Tests/LinearAlgebra/Distances/ManhattanTests.cs b/Algorithms.Tests/LinearAlgebra/Distances/ManhattanTests.cs index d03758b8..7544c336 100644 --- a/Algorithms.Tests/LinearAlgebra/Distances/ManhattanTests.cs +++ b/Algorithms.Tests/LinearAlgebra/Distances/ManhattanTests.cs @@ -1,7 +1,4 @@ -using NUnit.Framework; using Algorithms.LinearAlgebra.Distances; -using FluentAssertions; -using System; namespace Algorithms.Tests.LinearAlgebra.Distances; diff --git a/Algorithms.Tests/LinearAlgebra/Distances/MinkowskiTests.cs b/Algorithms.Tests/LinearAlgebra/Distances/MinkowskiTests.cs index 193677b7..96d86044 100644 --- a/Algorithms.Tests/LinearAlgebra/Distances/MinkowskiTests.cs +++ b/Algorithms.Tests/LinearAlgebra/Distances/MinkowskiTests.cs @@ -1,7 +1,4 @@ -using NUnit.Framework; using Algorithms.LinearAlgebra.Distances; -using FluentAssertions; -using System; namespace Algorithms.Tests.LinearAlgebra.Distances; diff --git a/Algorithms.Tests/LinearAlgebra/Eigenvalue/PowerIterationTests.cs b/Algorithms.Tests/LinearAlgebra/Eigenvalue/PowerIterationTests.cs index 10bf79df..a325a336 100644 --- a/Algorithms.Tests/LinearAlgebra/Eigenvalue/PowerIterationTests.cs +++ b/Algorithms.Tests/LinearAlgebra/Eigenvalue/PowerIterationTests.cs @@ -1,8 +1,4 @@ -using System; using Algorithms.LinearAlgebra.Eigenvalue; -using FluentAssertions; -using NUnit.Framework; -using Utilities.Extensions; namespace Algorithms.Tests.LinearAlgebra.Eigenvalue; diff --git a/Algorithms.Tests/ModularArithmetic/ChineseRemainderTheoremTest.cs b/Algorithms.Tests/ModularArithmetic/ChineseRemainderTheoremTest.cs index d282ff91..83fd7f8e 100644 --- a/Algorithms.Tests/ModularArithmetic/ChineseRemainderTheoremTest.cs +++ b/Algorithms.Tests/ModularArithmetic/ChineseRemainderTheoremTest.cs @@ -1,8 +1,4 @@ using Algorithms.ModularArithmetic; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Numerics; namespace Algorithms.Tests.ModularArithmetic; diff --git a/Algorithms.Tests/ModularArithmetic/ExtendedEuclideanAlgorithmTest.cs b/Algorithms.Tests/ModularArithmetic/ExtendedEuclideanAlgorithmTest.cs index 83ab1caf..168fcda6 100644 --- a/Algorithms.Tests/ModularArithmetic/ExtendedEuclideanAlgorithmTest.cs +++ b/Algorithms.Tests/ModularArithmetic/ExtendedEuclideanAlgorithmTest.cs @@ -1,6 +1,4 @@ using Algorithms.ModularArithmetic; -using NUnit.Framework; -using System.Numerics; namespace Algorithms.Tests.ModularArithmetic; diff --git a/Algorithms.Tests/ModularArithmetic/ModularMultiplicativeInverseTest.cs b/Algorithms.Tests/ModularArithmetic/ModularMultiplicativeInverseTest.cs index fef6a304..84028960 100644 --- a/Algorithms.Tests/ModularArithmetic/ModularMultiplicativeInverseTest.cs +++ b/Algorithms.Tests/ModularArithmetic/ModularMultiplicativeInverseTest.cs @@ -1,7 +1,4 @@ using Algorithms.ModularArithmetic; -using NUnit.Framework; -using System; -using System.Numerics; namespace Algorithms.Tests.ModularArithmetic; diff --git a/Algorithms.Tests/Numeric/AbsTests.cs b/Algorithms.Tests/Numeric/AbsTests.cs index 8e45bf9b..157620b3 100644 --- a/Algorithms.Tests/Numeric/AbsTests.cs +++ b/Algorithms.Tests/Numeric/AbsTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Numerics; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/AdditionWithoutArithmeticsTests.cs b/Algorithms.Tests/Numeric/AdditionWithoutArithmeticsTests.cs index a9eec6b1..edfe373e 100644 --- a/Algorithms.Tests/Numeric/AdditionWithoutArithmeticsTests.cs +++ b/Algorithms.Tests/Numeric/AdditionWithoutArithmeticsTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Numerics; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/AliquotSumCalculatorTests.cs b/Algorithms.Tests/Numeric/AliquotSumCalculatorTests.cs index 2cf7af0d..71cb8250 100644 --- a/Algorithms.Tests/Numeric/AliquotSumCalculatorTests.cs +++ b/Algorithms.Tests/Numeric/AliquotSumCalculatorTests.cs @@ -1,7 +1,4 @@ -using System; using Algorithms.Numeric; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/AmicableNumbersTest.cs b/Algorithms.Tests/Numeric/AmicableNumbersTest.cs index 59932646..661f5c77 100644 --- a/Algorithms.Tests/Numeric/AmicableNumbersTest.cs +++ b/Algorithms.Tests/Numeric/AmicableNumbersTest.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/AutomorphicNumberTests.cs b/Algorithms.Tests/Numeric/AutomorphicNumberTests.cs index 443b8ea9..895514e5 100644 --- a/Algorithms.Tests/Numeric/AutomorphicNumberTests.cs +++ b/Algorithms.Tests/Numeric/AutomorphicNumberTests.cs @@ -1,7 +1,4 @@ using Algorithms.Numeric; -using NUnit.Framework; -using System; -using System.Collections.Generic; namespace Algorithms.Tests.Numeric; @@ -17,7 +14,7 @@ public class AutomorphicNumberTests [TestCase(9376)] [TestCase(90625)] [TestCase(109376)] - + public void TestAutomorphicNumbers(int number) { Assert.That(AutomorphicNumber.IsAutomorphic(number), Is.True); @@ -69,14 +66,14 @@ public void TestNoAutomorphicNumberInTheSequence(int lower, int upper) Assert.That(AutomorphicNumber.GetAutomorphicNumbers(lower, upper), Is.EqualTo(automorphicList)); } - [TestCase(25,25)] + [TestCase(25, 25)] public void TestAutomorphicNumberSequenceSameBounds(int lower, int upper) { List automorphicList = new() { 25 }; Assert.That(AutomorphicNumber.GetAutomorphicNumbers(lower, upper), Is.EqualTo(automorphicList)); } - [TestCase(-1,1)] + [TestCase(-1, 1)] [TestCase(0, 1)] public void TestAutomorphicNumberSequenceInvalidLowerBound(int lower, int upper) { diff --git a/Algorithms.Tests/Numeric/BinomialCoefficientTests.cs b/Algorithms.Tests/Numeric/BinomialCoefficientTests.cs index 98b10222..13acfd11 100644 --- a/Algorithms.Tests/Numeric/BinomialCoefficientTests.cs +++ b/Algorithms.Tests/Numeric/BinomialCoefficientTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Numerics; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/CeilTests.cs b/Algorithms.Tests/Numeric/CeilTests.cs index a43904fa..be48789a 100644 --- a/Algorithms.Tests/Numeric/CeilTests.cs +++ b/Algorithms.Tests/Numeric/CeilTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Numerics; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/Decomposition/LUTests.cs b/Algorithms.Tests/Numeric/Decomposition/LUTests.cs index 105c1cf3..cee805e4 100644 --- a/Algorithms.Tests/Numeric/Decomposition/LUTests.cs +++ b/Algorithms.Tests/Numeric/Decomposition/LUTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; using Algorithms.Numeric.Decomposition; -using NUnit.Framework; -using Utilities.Extensions; namespace Algorithms.Tests.Numeric.Decomposition; diff --git a/Algorithms.Tests/Numeric/Decomposition/MaclaurinTests.cs b/Algorithms.Tests/Numeric/Decomposition/MaclaurinTests.cs index cedd5120..2a42cfd6 100644 --- a/Algorithms.Tests/Numeric/Decomposition/MaclaurinTests.cs +++ b/Algorithms.Tests/Numeric/Decomposition/MaclaurinTests.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Numeric.Series; -using NUnit.Framework; namespace Algorithms.Tests.Numeric.Decomposition; diff --git a/Algorithms.Tests/Numeric/Decomposition/SVDTests.cs b/Algorithms.Tests/Numeric/Decomposition/SVDTests.cs index 88ac87ee..121f24f3 100644 --- a/Algorithms.Tests/Numeric/Decomposition/SVDTests.cs +++ b/Algorithms.Tests/Numeric/Decomposition/SVDTests.cs @@ -1,10 +1,4 @@ -using System; using Algorithms.Numeric.Decomposition; -using FluentAssertions; -using NUnit.Framework; -using Utilities.Extensions; -using M = Utilities.Extensions.MatrixExtensions; -using V = Utilities.Extensions.VectorExtensions; namespace Algorithms.Tests.Numeric.Decomposition; diff --git a/Algorithms.Tests/Numeric/EulerMethodTest.cs b/Algorithms.Tests/Numeric/EulerMethodTest.cs index f022662b..e65a4424 100644 --- a/Algorithms.Tests/Numeric/EulerMethodTest.cs +++ b/Algorithms.Tests/Numeric/EulerMethodTest.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; using Algorithms.Numeric; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/FactorialTests.cs b/Algorithms.Tests/Numeric/FactorialTests.cs index 7a2ab058..c5c79716 100644 --- a/Algorithms.Tests/Numeric/FactorialTests.cs +++ b/Algorithms.Tests/Numeric/FactorialTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Numerics; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/Factorization/TrialDivisionFactorizerTests.cs b/Algorithms.Tests/Numeric/Factorization/TrialDivisionFactorizerTests.cs index 9144ce17..67e43806 100755 --- a/Algorithms.Tests/Numeric/Factorization/TrialDivisionFactorizerTests.cs +++ b/Algorithms.Tests/Numeric/Factorization/TrialDivisionFactorizerTests.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric.Factorization; -using NUnit.Framework; namespace Algorithms.Tests.Numeric.Factorization; diff --git a/Algorithms.Tests/Numeric/FloorTests.cs b/Algorithms.Tests/Numeric/FloorTests.cs index 9221c0d2..0005a085 100644 --- a/Algorithms.Tests/Numeric/FloorTests.cs +++ b/Algorithms.Tests/Numeric/FloorTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Numerics; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/GaussJordanEliminationTests.cs b/Algorithms.Tests/Numeric/GaussJordanEliminationTests.cs index 8d4bb9df..5ad8b0e9 100644 --- a/Algorithms.Tests/Numeric/GaussJordanEliminationTests.cs +++ b/Algorithms.Tests/Numeric/GaussJordanEliminationTests.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/GreatestCommonDivisor/BinaryGreatestCommonDivisorFinderTests.cs b/Algorithms.Tests/Numeric/GreatestCommonDivisor/BinaryGreatestCommonDivisorFinderTests.cs index 12218628..dc4446f5 100644 --- a/Algorithms.Tests/Numeric/GreatestCommonDivisor/BinaryGreatestCommonDivisorFinderTests.cs +++ b/Algorithms.Tests/Numeric/GreatestCommonDivisor/BinaryGreatestCommonDivisorFinderTests.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric.GreatestCommonDivisor; -using NUnit.Framework; namespace Algorithms.Tests.Numeric.GreatestCommonDivisor; diff --git a/Algorithms.Tests/Numeric/GreatestCommonDivisor/EuclideanGreatestCommonDivisorFinderTests.cs b/Algorithms.Tests/Numeric/GreatestCommonDivisor/EuclideanGreatestCommonDivisorFinderTests.cs index 22ab7a21..a271fa94 100644 --- a/Algorithms.Tests/Numeric/GreatestCommonDivisor/EuclideanGreatestCommonDivisorFinderTests.cs +++ b/Algorithms.Tests/Numeric/GreatestCommonDivisor/EuclideanGreatestCommonDivisorFinderTests.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric.GreatestCommonDivisor; -using NUnit.Framework; namespace Algorithms.Tests.Numeric.GreatestCommonDivisor; diff --git a/Algorithms.Tests/Numeric/JosephusProblemTest.cs b/Algorithms.Tests/Numeric/JosephusProblemTest.cs index b4ba7dcc..03db3fee 100644 --- a/Algorithms.Tests/Numeric/JosephusProblemTest.cs +++ b/Algorithms.Tests/Numeric/JosephusProblemTest.cs @@ -1,7 +1,4 @@ -using System; -using Algorithms.Numeric; -using NUnit.Framework; - +using Algorithms.Numeric; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/KeithNumberTest.cs b/Algorithms.Tests/Numeric/KeithNumberTest.cs index 9a3a9cd5..ad7aa140 100644 --- a/Algorithms.Tests/Numeric/KeithNumberTest.cs +++ b/Algorithms.Tests/Numeric/KeithNumberTest.cs @@ -1,6 +1,4 @@ using Algorithms.Numeric; -using NUnit.Framework; -using System; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/KrishnamurthyNumberCheckerTests.cs b/Algorithms.Tests/Numeric/KrishnamurthyNumberCheckerTests.cs index e8e150cc..76735601 100644 --- a/Algorithms.Tests/Numeric/KrishnamurthyNumberCheckerTests.cs +++ b/Algorithms.Tests/Numeric/KrishnamurthyNumberCheckerTests.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/MillerRabinPrimalityTest.cs b/Algorithms.Tests/Numeric/MillerRabinPrimalityTest.cs index acfae24b..f546c976 100644 --- a/Algorithms.Tests/Numeric/MillerRabinPrimalityTest.cs +++ b/Algorithms.Tests/Numeric/MillerRabinPrimalityTest.cs @@ -1,7 +1,4 @@ -using System; -using System.Numerics; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/ModularExponentiationTest.cs b/Algorithms.Tests/Numeric/ModularExponentiationTest.cs index 414fb026..9cba8df1 100644 --- a/Algorithms.Tests/Numeric/ModularExponentiationTest.cs +++ b/Algorithms.Tests/Numeric/ModularExponentiationTest.cs @@ -1,7 +1,4 @@ using Algorithms.Numeric; -using System; -using NUnit.Framework; -using FluentAssertions; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/NarcissisticNumberTest.cs b/Algorithms.Tests/Numeric/NarcissisticNumberTest.cs index 4741fe8a..9143ba94 100644 --- a/Algorithms.Tests/Numeric/NarcissisticNumberTest.cs +++ b/Algorithms.Tests/Numeric/NarcissisticNumberTest.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/NewtonSquareRootTests.cs b/Algorithms.Tests/Numeric/NewtonSquareRootTests.cs index d101f07d..33070e2a 100644 --- a/Algorithms.Tests/Numeric/NewtonSquareRootTests.cs +++ b/Algorithms.Tests/Numeric/NewtonSquareRootTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Numerics; -using NUnit.Framework; - -namespace Algorithms.Tests.Numeric; +namespace Algorithms.Tests.Numeric; public class NewtonSquareRootTests { diff --git a/Algorithms.Tests/Numeric/PerfectCubeTests.cs b/Algorithms.Tests/Numeric/PerfectCubeTests.cs index 9bf03aea..24f0f200 100644 --- a/Algorithms.Tests/Numeric/PerfectCubeTests.cs +++ b/Algorithms.Tests/Numeric/PerfectCubeTests.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/PerfectNumberTest.cs b/Algorithms.Tests/Numeric/PerfectNumberTest.cs index 8863fb01..467302ae 100644 --- a/Algorithms.Tests/Numeric/PerfectNumberTest.cs +++ b/Algorithms.Tests/Numeric/PerfectNumberTest.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/PerfectSquareTest.cs b/Algorithms.Tests/Numeric/PerfectSquareTest.cs index 494c12b7..7b979135 100644 --- a/Algorithms.Tests/Numeric/PerfectSquareTest.cs +++ b/Algorithms.Tests/Numeric/PerfectSquareTest.cs @@ -1,5 +1,4 @@ using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/PseudoInverse/PseudoInverseTests.cs b/Algorithms.Tests/Numeric/PseudoInverse/PseudoInverseTests.cs index 10138ffc..37f43f52 100644 --- a/Algorithms.Tests/Numeric/PseudoInverse/PseudoInverseTests.cs +++ b/Algorithms.Tests/Numeric/PseudoInverse/PseudoInverseTests.cs @@ -1,6 +1,3 @@ -using NUnit.Framework; -using Utilities.Extensions; - namespace Algorithms.Tests.Numeric.PseudoInverse; public static class PseudoInverseTests diff --git a/Algorithms.Tests/Numeric/RungeKuttaMethodTest.cs b/Algorithms.Tests/Numeric/RungeKuttaMethodTest.cs index b4eaff87..abdb4406 100644 --- a/Algorithms.Tests/Numeric/RungeKuttaMethodTest.cs +++ b/Algorithms.Tests/Numeric/RungeKuttaMethodTest.cs @@ -1,8 +1,4 @@ -using Algorithms.Numeric; -using FluentAssertions; -using NUnit.Framework; -using System; -using System.Collections.Generic; +using Algorithms.Numeric; namespace Algorithms.Tests.Numeric; diff --git a/Algorithms.Tests/Numeric/SoftMaxTests.cs b/Algorithms.Tests/Numeric/SoftMaxTests.cs index d44925e0..127db294 100644 --- a/Algorithms.Tests/Numeric/SoftMaxTests.cs +++ b/Algorithms.Tests/Numeric/SoftMaxTests.cs @@ -1,14 +1,12 @@ -using System; using Algorithms.Numeric; -using NUnit.Framework; namespace Algorithms.Tests.Numeric; public static class SoftMaxTests { - [TestCase(new[] {5.0, 5.0}, new[] {0.5, 0.5})] - [TestCase(new[] {1.0, 2.0, 3.0}, new[] {0.09003057317038046, 0.24472847105479767, 0.6652409557748219})] - [TestCase(new[] {0.0}, new[] {1.0})] + [TestCase(new[] { 5.0, 5.0 }, new[] { 0.5, 0.5 })] + [TestCase(new[] { 1.0, 2.0, 3.0 }, new[] { 0.09003057317038046, 0.24472847105479767, 0.6652409557748219 })] + [TestCase(new[] { 0.0 }, new[] { 1.0 })] public static void SoftMaxFunction(double[] input, double[] expected) { // Act @@ -28,9 +26,9 @@ public static void SoftMaxFunctionThrowsArgumentException() Assert.Throws(() => SoftMax.Compute(input)); } - [TestCase(new[] {1.0, 2.0, 3.0, 4.0, 5.0})] - [TestCase(new[] {0.0, 0.0, 0.0, 0.0, 0.0})] - [TestCase(new[] {5.0})] + [TestCase(new[] { 1.0, 2.0, 3.0, 4.0, 5.0 })] + [TestCase(new[] { 0.0, 0.0, 0.0, 0.0, 0.0 })] + [TestCase(new[] { 5.0 })] public static void SoftMaxFunctionSumsToOne(double[] input) { // Act diff --git a/Algorithms.Tests/Other/DecisionsConvolutionsTest.cs b/Algorithms.Tests/Other/DecisionsConvolutionsTest.cs index 53772d07..3c6dd99a 100644 --- a/Algorithms.Tests/Other/DecisionsConvolutionsTest.cs +++ b/Algorithms.Tests/Other/DecisionsConvolutionsTest.cs @@ -1,6 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; -using System.Collections.Generic; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/FermatPrimeCheckerTests.cs b/Algorithms.Tests/Other/FermatPrimeCheckerTests.cs index eb8bedce..636ebade 100644 --- a/Algorithms.Tests/Other/FermatPrimeCheckerTests.cs +++ b/Algorithms.Tests/Other/FermatPrimeCheckerTests.cs @@ -1,6 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/FloodFillTest.cs b/Algorithms.Tests/Other/FloodFillTest.cs index e24dc1da..777d75df 100644 --- a/Algorithms.Tests/Other/FloodFillTest.cs +++ b/Algorithms.Tests/Other/FloodFillTest.cs @@ -1,7 +1,4 @@ -using FluentAssertions; -using NUnit.Framework; using SkiaSharp; -using System; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/GaussOptimizationTest.cs b/Algorithms.Tests/Other/GaussOptimizationTest.cs index 76f824a3..a0cab84b 100644 --- a/Algorithms.Tests/Other/GaussOptimizationTest.cs +++ b/Algorithms.Tests/Other/GaussOptimizationTest.cs @@ -1,7 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; -using System; -using System.Collections.Generic; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/GeoLocationTests.cs b/Algorithms.Tests/Other/GeoLocationTests.cs index 5ba12c27..597f58e7 100644 --- a/Algorithms.Tests/Other/GeoLocationTests.cs +++ b/Algorithms.Tests/Other/GeoLocationTests.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Other; -using NUnit.Framework; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/GeofenceTests.cs b/Algorithms.Tests/Other/GeofenceTests.cs index 30dcfff4..c17a5070 100644 --- a/Algorithms.Tests/Other/GeofenceTests.cs +++ b/Algorithms.Tests/Other/GeofenceTests.cs @@ -1,10 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Algorithms.Tests.Other { diff --git a/Algorithms.Tests/Other/GeohashTests.cs b/Algorithms.Tests/Other/GeohashTests.cs index bf2cced4..5376982b 100644 --- a/Algorithms.Tests/Other/GeohashTests.cs +++ b/Algorithms.Tests/Other/GeohashTests.cs @@ -1,10 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Algorithms.Tests.Other { diff --git a/Algorithms.Tests/Other/Int2BinaryTests.cs b/Algorithms.Tests/Other/Int2BinaryTests.cs index 0b9cf1c5..4e7f8f2e 100644 --- a/Algorithms.Tests/Other/Int2BinaryTests.cs +++ b/Algorithms.Tests/Other/Int2BinaryTests.cs @@ -1,5 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/JulianEasterTests.cs b/Algorithms.Tests/Other/JulianEasterTests.cs index 214ec970..22305196 100644 --- a/Algorithms.Tests/Other/JulianEasterTests.cs +++ b/Algorithms.Tests/Other/JulianEasterTests.cs @@ -1,7 +1,4 @@ -using System; -using System.Globalization; using Algorithms.Other; -using NUnit.Framework; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/KochSnowflakeTest.cs b/Algorithms.Tests/Other/KochSnowflakeTest.cs index 432a6975..96f5b39d 100644 --- a/Algorithms.Tests/Other/KochSnowflakeTest.cs +++ b/Algorithms.Tests/Other/KochSnowflakeTest.cs @@ -1,10 +1,5 @@ using Algorithms.Other; -using FluentAssertions; -using NUnit.Framework; using SkiaSharp; -using System; -using System.Collections.Generic; -using System.Numerics; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/LuhnTests.cs b/Algorithms.Tests/Other/LuhnTests.cs index 7bd32a47..316e8b4e 100644 --- a/Algorithms.Tests/Other/LuhnTests.cs +++ b/Algorithms.Tests/Other/LuhnTests.cs @@ -1,5 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/MandelbrotTest.cs b/Algorithms.Tests/Other/MandelbrotTest.cs index 6588160d..03175964 100644 --- a/Algorithms.Tests/Other/MandelbrotTest.cs +++ b/Algorithms.Tests/Other/MandelbrotTest.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Other; -using NUnit.Framework; using SkiaSharp; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/ParetoOptimizationTests.cs b/Algorithms.Tests/Other/ParetoOptimizationTests.cs index 9daf1113..816d486d 100644 --- a/Algorithms.Tests/Other/ParetoOptimizationTests.cs +++ b/Algorithms.Tests/Other/ParetoOptimizationTests.cs @@ -1,6 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; -using System.Collections.Generic; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/PollardsRhoFactorizingTests.cs b/Algorithms.Tests/Other/PollardsRhoFactorizingTests.cs index d3aa8b62..8c58aef1 100644 --- a/Algorithms.Tests/Other/PollardsRhoFactorizingTests.cs +++ b/Algorithms.Tests/Other/PollardsRhoFactorizingTests.cs @@ -1,5 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/RGBHSVConversionTest.cs b/Algorithms.Tests/Other/RGBHSVConversionTest.cs index 8a577134..9c4fd0b9 100644 --- a/Algorithms.Tests/Other/RGBHSVConversionTest.cs +++ b/Algorithms.Tests/Other/RGBHSVConversionTest.cs @@ -1,7 +1,4 @@ -using System; using Algorithms.Other; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Other; diff --git a/Algorithms.Tests/Other/SieveOfEratosthenesTests.cs b/Algorithms.Tests/Other/SieveOfEratosthenesTests.cs index 3f3f5eae..276a59a3 100644 --- a/Algorithms.Tests/Other/SieveOfEratosthenesTests.cs +++ b/Algorithms.Tests/Other/SieveOfEratosthenesTests.cs @@ -1,7 +1,4 @@ -using System.Numerics; using Algorithms.Other; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Other; @@ -668,7 +665,7 @@ public static class SieveOfEratosthenesTests }; [Test] - public static void First10_000PrimesCorrect() => + public static void First10_000PrimesCorrect() => Assert.That(new SieveOfEratosthenes(104729).GetPrimes(), Is.EqualTo(First10000PrimeNumbers)); [Test] diff --git a/Algorithms.Tests/Other/TriangulatorTests.cs b/Algorithms.Tests/Other/TriangulatorTests.cs index 39014684..7bae464e 100644 --- a/Algorithms.Tests/Other/TriangulatorTests.cs +++ b/Algorithms.Tests/Other/TriangulatorTests.cs @@ -1,10 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Algorithms.Tests.Other { diff --git a/Algorithms.Tests/Other/WelfordsVarianceTest.cs b/Algorithms.Tests/Other/WelfordsVarianceTest.cs index 8b25b54a..c99ceb8f 100644 --- a/Algorithms.Tests/Other/WelfordsVarianceTest.cs +++ b/Algorithms.Tests/Other/WelfordsVarianceTest.cs @@ -1,5 +1,4 @@ using Algorithms.Other; -using NUnit.Framework; namespace Algorithms.Tests.Other; @@ -98,7 +97,7 @@ public void WelfordVariance_Example7() public void WelfordVariance_Example8() { var stats = new WelfordsVariance(); - stats.AddRange(new [] { 51.3, 55.6, 49.9, 52.0 }); + stats.AddRange(new[] { 51.3, 55.6, 49.9, 52.0 }); Assert.That(stats.Count, Is.EqualTo(4)); Assert.That(stats.Mean, Is.EqualTo(52.2).Within(0.0000001)); Assert.That(stats.Variance, Is.EqualTo(4.4250000).Within(0.0000001)); diff --git a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateChangesDictionaryTests.cs b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateChangesDictionaryTests.cs index a9fc7840..a00e0e43 100644 --- a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateChangesDictionaryTests.cs +++ b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateChangesDictionaryTests.cs @@ -1,7 +1,4 @@ -using System.Linq; using Algorithms.Problems.DynamicProgramming.CoinChange; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Problems.DynamicProgramming.CoinChange; diff --git a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateSingleCoinChangesTests.cs b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateSingleCoinChangesTests.cs index 9c57c841..94f1d0a3 100644 --- a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateSingleCoinChangesTests.cs +++ b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GenerateSingleCoinChangesTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; using Algorithms.Problems.DynamicProgramming.CoinChange; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Problems.DynamicProgramming.CoinChange; diff --git a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GetMinimalNextCoinTests.cs b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GetMinimalNextCoinTests.cs index 0c354b50..31b95e48 100644 --- a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GetMinimalNextCoinTests.cs +++ b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/GetMinimalNextCoinTests.cs @@ -1,6 +1,4 @@ using Algorithms.Problems.DynamicProgramming.CoinChange; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Problems.DynamicProgramming.CoinChange; diff --git a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/MakeCoinChangeDynamicTests.cs b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/MakeCoinChangeDynamicTests.cs index 19e19e61..0003c806 100644 --- a/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/MakeCoinChangeDynamicTests.cs +++ b/Algorithms.Tests/Problems/DynamicProgramming/CoinChange/MakeCoinChangeDynamicTests.cs @@ -1,7 +1,4 @@ -using System.Linq; using Algorithms.Problems.DynamicProgramming.CoinChange; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Problems.DynamicProgramming.CoinChange; diff --git a/Algorithms.Tests/Problems/DynamicProgramming/LevenshteinDistance/LevenshteinDistanceTests.cs b/Algorithms.Tests/Problems/DynamicProgramming/LevenshteinDistance/LevenshteinDistanceTests.cs index 13005638..200da595 100644 --- a/Algorithms.Tests/Problems/DynamicProgramming/LevenshteinDistance/LevenshteinDistanceTests.cs +++ b/Algorithms.Tests/Problems/DynamicProgramming/LevenshteinDistance/LevenshteinDistanceTests.cs @@ -1,4 +1,3 @@ -using NUnit.Framework; using Algorithms.Problems.DynamicProgramming; namespace Algorithms.Tests.DynamicProgramming; diff --git a/Algorithms.Tests/Problems/NQueens/BacktrackingNQueensSolverTests.cs b/Algorithms.Tests/Problems/NQueens/BacktrackingNQueensSolverTests.cs index a54e2756..9d98a160 100644 --- a/Algorithms.Tests/Problems/NQueens/BacktrackingNQueensSolverTests.cs +++ b/Algorithms.Tests/Problems/NQueens/BacktrackingNQueensSolverTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; using Algorithms.Problems.NQueens; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Problems.NQueens; diff --git a/Algorithms.Tests/Problems/StableMarriage/GaleShapleyTests.cs b/Algorithms.Tests/Problems/StableMarriage/GaleShapleyTests.cs index d8318762..b2662e26 100644 --- a/Algorithms.Tests/Problems/StableMarriage/GaleShapleyTests.cs +++ b/Algorithms.Tests/Problems/StableMarriage/GaleShapleyTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; using Algorithms.Problems.StableMarriage; -using NUnit.Framework; namespace Algorithms.Tests.Problems.StableMarriage; diff --git a/Algorithms.Tests/RecommenderSystem/CollaborativeFilteringTests.cs b/Algorithms.Tests/RecommenderSystem/CollaborativeFilteringTests.cs index 208de6fb..038b5596 100644 --- a/Algorithms.Tests/RecommenderSystem/CollaborativeFilteringTests.cs +++ b/Algorithms.Tests/RecommenderSystem/CollaborativeFilteringTests.cs @@ -1,7 +1,5 @@ using Algorithms.RecommenderSystem; using Moq; -using NUnit.Framework; -using System.Collections.Generic; namespace Algorithms.Tests.RecommenderSystem { diff --git a/Algorithms.Tests/Search/BinarySearcherTests.cs b/Algorithms.Tests/Search/BinarySearcherTests.cs index 5d1669a1..ccf86ecc 100644 --- a/Algorithms.Tests/Search/BinarySearcherTests.cs +++ b/Algorithms.Tests/Search/BinarySearcherTests.cs @@ -1,7 +1,4 @@ -using System.Linq; using Algorithms.Search; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Search/BoyerMooreTests.cs b/Algorithms.Tests/Search/BoyerMooreTests.cs index 4ad891fc..b8902488 100644 --- a/Algorithms.Tests/Search/BoyerMooreTests.cs +++ b/Algorithms.Tests/Search/BoyerMooreTests.cs @@ -1,9 +1,4 @@ using Algorithms.Search; -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Search/FastSearcherTests.cs b/Algorithms.Tests/Search/FastSearcherTests.cs index 224c244d..9289e561 100644 --- a/Algorithms.Tests/Search/FastSearcherTests.cs +++ b/Algorithms.Tests/Search/FastSearcherTests.cs @@ -1,7 +1,4 @@ using Algorithms.Search; -using FluentAssertions; -using NUnit.Framework; -using System; using Utilities.Exceptions; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Search/FibonacciSearcherTests.cs b/Algorithms.Tests/Search/FibonacciSearcherTests.cs index 84d5da3c..5506c56f 100644 --- a/Algorithms.Tests/Search/FibonacciSearcherTests.cs +++ b/Algorithms.Tests/Search/FibonacciSearcherTests.cs @@ -1,7 +1,4 @@ using Algorithms.Search; -using FluentAssertions; -using NUnit.Framework; -using System; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Search/Helper.cs b/Algorithms.Tests/Search/Helper.cs index ce1ab35d..f1974a9f 100644 --- a/Algorithms.Tests/Search/Helper.cs +++ b/Algorithms.Tests/Search/Helper.cs @@ -1,6 +1,3 @@ -using System.Linq; -using NUnit.Framework; - namespace Algorithms.Tests.Search; public static class Helper diff --git a/Algorithms.Tests/Search/InterpolationSearchTests.cs b/Algorithms.Tests/Search/InterpolationSearchTests.cs index 098e803a..4218bd24 100644 --- a/Algorithms.Tests/Search/InterpolationSearchTests.cs +++ b/Algorithms.Tests/Search/InterpolationSearchTests.cs @@ -1,8 +1,4 @@ -using Algorithms.Search; -using NUnit.Framework.Internal; -using NUnit.Framework; -using System; -using System.Linq; +using Algorithms.Search; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Search/JumpSearcherTests.cs b/Algorithms.Tests/Search/JumpSearcherTests.cs index b58ccb7b..99db2b0b 100644 --- a/Algorithms.Tests/Search/JumpSearcherTests.cs +++ b/Algorithms.Tests/Search/JumpSearcherTests.cs @@ -1,8 +1,4 @@ using Algorithms.Search; -using NUnit.Framework; -using System; -using System.Linq; -using FluentAssertions; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Search/LinearSearcherTests.cs b/Algorithms.Tests/Search/LinearSearcherTests.cs index 44c6128a..aaddc93b 100644 --- a/Algorithms.Tests/Search/LinearSearcherTests.cs +++ b/Algorithms.Tests/Search/LinearSearcherTests.cs @@ -1,8 +1,4 @@ -using System; -using System.Linq; using Algorithms.Search; -using NUnit.Framework; -using NUnit.Framework.Internal; using Utilities.Exceptions; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Search/RecursiveBinarySearcherTests.cs b/Algorithms.Tests/Search/RecursiveBinarySearcherTests.cs index 1b35d079..d9c2ae6e 100644 --- a/Algorithms.Tests/Search/RecursiveBinarySearcherTests.cs +++ b/Algorithms.Tests/Search/RecursiveBinarySearcherTests.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; using Algorithms.Search; -using FluentAssertions; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Search; diff --git a/Algorithms.Tests/Sequences/AllOnesSequenceTests.cs b/Algorithms.Tests/Sequences/AllOnesSequenceTests.cs index 710520dd..a4c58cfa 100644 --- a/Algorithms.Tests/Sequences/AllOnesSequenceTests.cs +++ b/Algorithms.Tests/Sequences/AllOnesSequenceTests.cs @@ -1,11 +1,7 @@ using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; -using System; -using System.Linq; -using System.Numerics; namespace Algorithms.Tests.Sequences; + public class AllOnesSequenceTests { [Test] diff --git a/Algorithms.Tests/Sequences/AllThreesSequenceTests.cs b/Algorithms.Tests/Sequences/AllThreesSequenceTests.cs index 41efbe36..25fa1287 100644 --- a/Algorithms.Tests/Sequences/AllThreesSequenceTests.cs +++ b/Algorithms.Tests/Sequences/AllThreesSequenceTests.cs @@ -1,11 +1,7 @@ using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; -using System; -using System.Linq; -using System.Numerics; namespace Algorithms.Tests.Sequences; + public class AllThreesSequenceTests { [Test] diff --git a/Algorithms.Tests/Sequences/AllTwosSequenceTests.cs b/Algorithms.Tests/Sequences/AllTwosSequenceTests.cs index 3286e87d..8833c27a 100644 --- a/Algorithms.Tests/Sequences/AllTwosSequenceTests.cs +++ b/Algorithms.Tests/Sequences/AllTwosSequenceTests.cs @@ -1,11 +1,7 @@ using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; -using System; -using System.Linq; -using System.Numerics; namespace Algorithms.Tests.Sequences; + public class AllTwosSequenceTests { [Test] diff --git a/Algorithms.Tests/Sequences/BinaryPrimeConstantSequenceTests.cs b/Algorithms.Tests/Sequences/BinaryPrimeConstantSequenceTests.cs index 8e595950..fe974c2a 100644 --- a/Algorithms.Tests/Sequences/BinaryPrimeConstantSequenceTests.cs +++ b/Algorithms.Tests/Sequences/BinaryPrimeConstantSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/BinomialSequenceTests.cs b/Algorithms.Tests/Sequences/BinomialSequenceTests.cs index 928fee2c..a6711501 100644 --- a/Algorithms.Tests/Sequences/BinomialSequenceTests.cs +++ b/Algorithms.Tests/Sequences/BinomialSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/CakeNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/CakeNumbersSequenceTests.cs index bd3ab74c..0e6ad0d9 100644 --- a/Algorithms.Tests/Sequences/CakeNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/CakeNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/CatalanSequenceTest.cs b/Algorithms.Tests/Sequences/CatalanSequenceTest.cs index 69fbac80..1c7da291 100644 --- a/Algorithms.Tests/Sequences/CatalanSequenceTest.cs +++ b/Algorithms.Tests/Sequences/CatalanSequenceTest.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/CentralPolygonalNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/CentralPolygonalNumbersSequenceTests.cs index bfdb975c..d3dd66e5 100644 --- a/Algorithms.Tests/Sequences/CentralPolygonalNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/CentralPolygonalNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/CubesSequenceTests.cs b/Algorithms.Tests/Sequences/CubesSequenceTests.cs index 2b440136..ffe9b77e 100644 --- a/Algorithms.Tests/Sequences/CubesSequenceTests.cs +++ b/Algorithms.Tests/Sequences/CubesSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/DivisorsCountSequenceTests.cs b/Algorithms.Tests/Sequences/DivisorsCountSequenceTests.cs index bf2fa9c4..218e5b2c 100644 --- a/Algorithms.Tests/Sequences/DivisorsCountSequenceTests.cs +++ b/Algorithms.Tests/Sequences/DivisorsCountSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/EuclidNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/EuclidNumbersSequenceTests.cs index 46a3d212..08060cb0 100644 --- a/Algorithms.Tests/Sequences/EuclidNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/EuclidNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; @@ -12,7 +8,7 @@ public class EuclidNumbersSequenceTests public void First10ElementsCorrect() { var sequence = new EuclidNumbersSequence().Sequence.Take(10); - sequence.SequenceEqual(new BigInteger[] + sequence.SequenceEqual(new BigInteger[] { 2, 3, 7, 31, 211, 2311, 30031, 510511, 9699691, 223092871 }) .Should().BeTrue(); } diff --git a/Algorithms.Tests/Sequences/EulerTotientSequenceTests.cs b/Algorithms.Tests/Sequences/EulerTotientSequenceTests.cs index 178ee787..18dcf092 100644 --- a/Algorithms.Tests/Sequences/EulerTotientSequenceTests.cs +++ b/Algorithms.Tests/Sequences/EulerTotientSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/FactorialSequenceTest.cs b/Algorithms.Tests/Sequences/FactorialSequenceTest.cs index ae98d986..8f666d09 100644 --- a/Algorithms.Tests/Sequences/FactorialSequenceTest.cs +++ b/Algorithms.Tests/Sequences/FactorialSequenceTest.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/FermatNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/FermatNumbersSequenceTests.cs index 2c71f0bb..3409248c 100644 --- a/Algorithms.Tests/Sequences/FermatNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/FermatNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/FermatPrimesSequenceTests.cs b/Algorithms.Tests/Sequences/FermatPrimesSequenceTests.cs index caf1577a..06fc5abe 100644 --- a/Algorithms.Tests/Sequences/FermatPrimesSequenceTests.cs +++ b/Algorithms.Tests/Sequences/FermatPrimesSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/FibonacciSequenceTests.cs b/Algorithms.Tests/Sequences/FibonacciSequenceTests.cs index feebfd95..25dc3b51 100644 --- a/Algorithms.Tests/Sequences/FibonacciSequenceTests.cs +++ b/Algorithms.Tests/Sequences/FibonacciSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/GolombsSequenceTests.cs b/Algorithms.Tests/Sequences/GolombsSequenceTests.cs index be0f95d5..f18022bb 100644 --- a/Algorithms.Tests/Sequences/GolombsSequenceTests.cs +++ b/Algorithms.Tests/Sequences/GolombsSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/KolakoskiSequenceTests.cs b/Algorithms.Tests/Sequences/KolakoskiSequenceTests.cs index 255ce34c..3af2297a 100644 --- a/Algorithms.Tests/Sequences/KolakoskiSequenceTests.cs +++ b/Algorithms.Tests/Sequences/KolakoskiSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/KummerNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/KummerNumbersSequenceTests.cs index b916b363..fc5ede8a 100644 --- a/Algorithms.Tests/Sequences/KummerNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/KummerNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; @@ -12,7 +8,7 @@ public class KummerNumbersSequenceTests public void First10ElementsCorrect() { var sequence = new KummerNumbersSequence().Sequence.Take(10); - sequence.SequenceEqual(new BigInteger[] + sequence.SequenceEqual(new BigInteger[] { 1, 5, 29, 209, 2309, 30029, 510509, 9699689, 223092869, 6469693229 }) .Should().BeTrue(); } diff --git a/Algorithms.Tests/Sequences/LucasNumbersBeginningAt2SequenceTests.cs b/Algorithms.Tests/Sequences/LucasNumbersBeginningAt2SequenceTests.cs index 7d79778e..b69bffcb 100644 --- a/Algorithms.Tests/Sequences/LucasNumbersBeginningAt2SequenceTests.cs +++ b/Algorithms.Tests/Sequences/LucasNumbersBeginningAt2SequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; -using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Sequences; namespace Algorithms.Tests.Sequences; @@ -102,7 +98,7 @@ public void FirstElementsCorrect() "627376215338105766356982006981782561278127", }; - var check = bigNumbers.Select(BigInteger.Parse).ToArray(); + var check = bigNumbers.Select(BigInteger.Parse).ToArray(); var sequence = new LucasNumbersBeginningAt2Sequence().Sequence.Take(check.Length); sequence.SequenceEqual(check).Should().BeTrue(); } diff --git a/Algorithms.Tests/Sequences/MakeChangeSequenceTests.cs b/Algorithms.Tests/Sequences/MakeChangeSequenceTests.cs index 69a79aaa..58f00b23 100644 --- a/Algorithms.Tests/Sequences/MakeChangeSequenceTests.cs +++ b/Algorithms.Tests/Sequences/MakeChangeSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/MatchstickTriangleSequenceTests.cs b/Algorithms.Tests/Sequences/MatchstickTriangleSequenceTests.cs index 06b61be3..31959112 100644 --- a/Algorithms.Tests/Sequences/MatchstickTriangleSequenceTests.cs +++ b/Algorithms.Tests/Sequences/MatchstickTriangleSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/NaturalSequenceTests.cs b/Algorithms.Tests/Sequences/NaturalSequenceTests.cs index 3855461d..b455dbb6 100644 --- a/Algorithms.Tests/Sequences/NaturalSequenceTests.cs +++ b/Algorithms.Tests/Sequences/NaturalSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/NegativeIntegersSequenceTests.cs b/Algorithms.Tests/Sequences/NegativeIntegersSequenceTests.cs index 1d70b85f..4762361c 100644 --- a/Algorithms.Tests/Sequences/NegativeIntegersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/NegativeIntegersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/NumberOfBooleanFunctionsSequenceTests.cs b/Algorithms.Tests/Sequences/NumberOfBooleanFunctionsSequenceTests.cs index 805129db..b4c87cc2 100644 --- a/Algorithms.Tests/Sequences/NumberOfBooleanFunctionsSequenceTests.cs +++ b/Algorithms.Tests/Sequences/NumberOfBooleanFunctionsSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/NumberOfPrimesByNumberOfDigitsSequenceTests.cs b/Algorithms.Tests/Sequences/NumberOfPrimesByNumberOfDigitsSequenceTests.cs index 79de5310..9c4add4b 100644 --- a/Algorithms.Tests/Sequences/NumberOfPrimesByNumberOfDigitsSequenceTests.cs +++ b/Algorithms.Tests/Sequences/NumberOfPrimesByNumberOfDigitsSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/NumberOfPrimesByPowersOf10SequenceTests.cs b/Algorithms.Tests/Sequences/NumberOfPrimesByPowersOf10SequenceTests.cs index 33bf3cd6..8e7d0723 100644 --- a/Algorithms.Tests/Sequences/NumberOfPrimesByPowersOf10SequenceTests.cs +++ b/Algorithms.Tests/Sequences/NumberOfPrimesByPowersOf10SequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/OnesCountingSequenceTest.cs b/Algorithms.Tests/Sequences/OnesCountingSequenceTest.cs index 49e34025..6b70790d 100644 --- a/Algorithms.Tests/Sequences/OnesCountingSequenceTest.cs +++ b/Algorithms.Tests/Sequences/OnesCountingSequenceTest.cs @@ -1,9 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Sequences; namespace Algorithms.Tests.Sequences; @@ -73,11 +68,12 @@ public class OnesCountingSequenceTest /// Number of 1s in binary representation of number. private int CountOnes(BigInteger i) { - var temp = i; + var temp = i; BigInteger remainder = 0; - var result = 0; + var result = 0; - while (temp != BigInteger.Zero) { + while (temp != BigInteger.Zero) + { temp = BigInteger.DivRem(temp, 2, out remainder); result += remainder.IsOne ? 1 : 0; } @@ -99,7 +95,8 @@ public void CompareAgainstCalculated() { // Calculate 1s in binary value the old fashioned way. var calculated = new List(); - for (var i = 0; i < oeisValues.Length; i++) { + for (var i = 0; i < oeisValues.Length; i++) + { calculated.Add(CountOnes(new BigInteger(i))); } diff --git a/Algorithms.Tests/Sequences/PowersOf10SequenceTests.cs b/Algorithms.Tests/Sequences/PowersOf10SequenceTests.cs index 36935052..f2e4f33c 100644 --- a/Algorithms.Tests/Sequences/PowersOf10SequenceTests.cs +++ b/Algorithms.Tests/Sequences/PowersOf10SequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; @@ -12,7 +8,7 @@ public class PowersOf10SequenceTests public void First10ElementsCorrect() { var sequence = new PowersOf10Sequence().Sequence.Take(10); - sequence.SequenceEqual(new BigInteger[] + sequence.SequenceEqual(new BigInteger[] { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }) .Should().BeTrue(); } diff --git a/Algorithms.Tests/Sequences/PowersOf2SequenceTests.cs b/Algorithms.Tests/Sequences/PowersOf2SequenceTests.cs index b3848f24..d1040590 100644 --- a/Algorithms.Tests/Sequences/PowersOf2SequenceTests.cs +++ b/Algorithms.Tests/Sequences/PowersOf2SequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/PrimePiSequenceTests.cs b/Algorithms.Tests/Sequences/PrimePiSequenceTests.cs index e7f67a8a..88c2c96a 100644 --- a/Algorithms.Tests/Sequences/PrimePiSequenceTests.cs +++ b/Algorithms.Tests/Sequences/PrimePiSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/PrimesSequenceTests.cs b/Algorithms.Tests/Sequences/PrimesSequenceTests.cs index b88a58c6..bad04ca7 100644 --- a/Algorithms.Tests/Sequences/PrimesSequenceTests.cs +++ b/Algorithms.Tests/Sequences/PrimesSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/PrimorialNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/PrimorialNumbersSequenceTests.cs index d2de66b6..053dff82 100644 --- a/Algorithms.Tests/Sequences/PrimorialNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/PrimorialNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; @@ -12,7 +8,7 @@ public class PrimorialNumbersSequenceTests public void First10ElementsCorrect() { var sequence = new PrimorialNumbersSequence().Sequence.Take(10); - sequence.SequenceEqual(new BigInteger[] + sequence.SequenceEqual(new BigInteger[] { 1, 2, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870 }) .Should().BeTrue(); } diff --git a/Algorithms.Tests/Sequences/RecamansSequenceTests.cs b/Algorithms.Tests/Sequences/RecamansSequenceTests.cs index 6f018cb7..5f76ba03 100644 --- a/Algorithms.Tests/Sequences/RecamansSequenceTests.cs +++ b/Algorithms.Tests/Sequences/RecamansSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/SquaresSequenceTests.cs b/Algorithms.Tests/Sequences/SquaresSequenceTests.cs index 7ed748e2..7b92550f 100644 --- a/Algorithms.Tests/Sequences/SquaresSequenceTests.cs +++ b/Algorithms.Tests/Sequences/SquaresSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/TetrahedralSequenceTests.cs b/Algorithms.Tests/Sequences/TetrahedralSequenceTests.cs index 82ceb63e..165368ad 100644 --- a/Algorithms.Tests/Sequences/TetrahedralSequenceTests.cs +++ b/Algorithms.Tests/Sequences/TetrahedralSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; -using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Sequences; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/TetranacciNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/TetranacciNumbersSequenceTests.cs index 84e0c5b9..cf7c2a5f 100644 --- a/Algorithms.Tests/Sequences/TetranacciNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/TetranacciNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/ThreeNPlusOneStepsSequenceTests.cs b/Algorithms.Tests/Sequences/ThreeNPlusOneStepsSequenceTests.cs index ab1bfb3f..8745a352 100644 --- a/Algorithms.Tests/Sequences/ThreeNPlusOneStepsSequenceTests.cs +++ b/Algorithms.Tests/Sequences/ThreeNPlusOneStepsSequenceTests.cs @@ -1,14 +1,12 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; -public class ThreeNPlusOneStepsSequenceTests { +public class ThreeNPlusOneStepsSequenceTests +{ [Test] - public void First50ElementsCorrect() { + public void First50ElementsCorrect() + { var sequence = new ThreeNPlusOneStepsSequence().Sequence.Take(50); var first50 = new BigInteger[] { 0, 1, 7, 2, 5, 8, 16, 3, 19, 6, diff --git a/Algorithms.Tests/Sequences/TribonacciNumbersSequenceTests.cs b/Algorithms.Tests/Sequences/TribonacciNumbersSequenceTests.cs index 8d2b4a7d..45b414df 100644 --- a/Algorithms.Tests/Sequences/TribonacciNumbersSequenceTests.cs +++ b/Algorithms.Tests/Sequences/TribonacciNumbersSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/VanEcksSequenceTests.cs b/Algorithms.Tests/Sequences/VanEcksSequenceTests.cs index 4ee2caaa..e6768005 100644 --- a/Algorithms.Tests/Sequences/VanEcksSequenceTests.cs +++ b/Algorithms.Tests/Sequences/VanEcksSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Sequences/ZeroSequenceTests.cs b/Algorithms.Tests/Sequences/ZeroSequenceTests.cs index 0a337d0c..95deed1a 100644 --- a/Algorithms.Tests/Sequences/ZeroSequenceTests.cs +++ b/Algorithms.Tests/Sequences/ZeroSequenceTests.cs @@ -1,8 +1,4 @@ -using System.Linq; -using System.Numerics; using Algorithms.Sequences; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Sequences; diff --git a/Algorithms.Tests/Shufflers/FisherYatesShufflerTests.cs b/Algorithms.Tests/Shufflers/FisherYatesShufflerTests.cs index c9352e89..d4bee8f6 100644 --- a/Algorithms.Tests/Shufflers/FisherYatesShufflerTests.cs +++ b/Algorithms.Tests/Shufflers/FisherYatesShufflerTests.cs @@ -1,8 +1,5 @@ using Algorithms.Shufflers; using Algorithms.Tests.Helpers; -using FluentAssertions; -using NUnit.Framework; -using System; namespace Algorithms.Tests.Shufflers; diff --git a/Algorithms.Tests/Shufflers/LINQShufflerTests.cs b/Algorithms.Tests/Shufflers/LINQShufflerTests.cs index 5894ca88..82491da3 100644 --- a/Algorithms.Tests/Shufflers/LINQShufflerTests.cs +++ b/Algorithms.Tests/Shufflers/LINQShufflerTests.cs @@ -1,8 +1,5 @@ using Algorithms.Shufflers; using Algorithms.Tests.Helpers; -using FluentAssertions; -using NUnit.Framework; -using System; namespace Algorithms.Tests.Shufflers { diff --git a/Algorithms.Tests/Shufflers/NaiveShufflerTests.cs b/Algorithms.Tests/Shufflers/NaiveShufflerTests.cs index 111b718a..191dd8bf 100644 --- a/Algorithms.Tests/Shufflers/NaiveShufflerTests.cs +++ b/Algorithms.Tests/Shufflers/NaiveShufflerTests.cs @@ -1,8 +1,5 @@ using Algorithms.Shufflers; using Algorithms.Tests.Helpers; -using FluentAssertions; -using NUnit.Framework; -using System; namespace Algorithms.Tests.Shufflers { diff --git a/Algorithms.Tests/Shufflers/RecursiveShufflerTests.cs b/Algorithms.Tests/Shufflers/RecursiveShufflerTests.cs index 0559e401..9375c3dc 100644 --- a/Algorithms.Tests/Shufflers/RecursiveShufflerTests.cs +++ b/Algorithms.Tests/Shufflers/RecursiveShufflerTests.cs @@ -1,8 +1,5 @@ using Algorithms.Shufflers; using Algorithms.Tests.Helpers; -using FluentAssertions; -using NUnit.Framework; -using System; namespace Algorithms.Tests.Shufflers { diff --git a/Algorithms.Tests/Sorters/Comparison/BasicTeamSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/BasicTeamSorterTests.cs index f699202d..ef252f76 100644 --- a/Algorithms.Tests/Sorters/Comparison/BasicTeamSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/BasicTeamSorterTests.cs @@ -1,8 +1,4 @@ using Algorithms.Sorters.Comparison; -using FluentAssertions; -using NUnit.Framework; -using System; -using System.Collections.Generic; namespace Algorithms.Tests.Sorters.Comparison { diff --git a/Algorithms.Tests/Sorters/Comparison/BinaryInsertionSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/BinaryInsertionSorterTests.cs index 3c1f75dd..2d1dfc9a 100644 --- a/Algorithms.Tests/Sorters/Comparison/BinaryInsertionSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/BinaryInsertionSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/BogoSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/BogoSorterTests.cs index e25ab47f..ea11d4c2 100644 --- a/Algorithms.Tests/Sorters/Comparison/BogoSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/BogoSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/BubbleSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/BubbleSorterTests.cs index 4ba41d7f..fcfe946c 100644 --- a/Algorithms.Tests/Sorters/Comparison/BubbleSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/BubbleSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/CocktailSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/CocktailSorterTests.cs index 2329a1a9..79108d4d 100644 --- a/Algorithms.Tests/Sorters/Comparison/CocktailSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/CocktailSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/CombSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/CombSorterTests.cs index a708271f..dbbb3561 100644 --- a/Algorithms.Tests/Sorters/Comparison/CombSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/CombSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/CycleSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/CycleSorterTests.cs index 1fda91d9..f6d0f10d 100644 --- a/Algorithms.Tests/Sorters/Comparison/CycleSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/CycleSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/ExchangeSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/ExchangeSorterTests.cs index 7b672399..e1ab297a 100644 --- a/Algorithms.Tests/Sorters/Comparison/ExchangeSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/ExchangeSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/GnomeSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/GnomeSorterTests.cs index fc9cb5a8..f1179742 100644 --- a/Algorithms.Tests/Sorters/Comparison/GnomeSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/GnomeSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/HeapSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/HeapSorterTests.cs index 44decc30..951c9f97 100644 --- a/Algorithms.Tests/Sorters/Comparison/HeapSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/HeapSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/InsertionSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/InsertionSorterTests.cs index 1ad383e5..1ff7a23f 100644 --- a/Algorithms.Tests/Sorters/Comparison/InsertionSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/InsertionSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/MedianOfThreeQuickSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/MedianOfThreeQuickSorterTests.cs index a3440fd5..a404d145 100644 --- a/Algorithms.Tests/Sorters/Comparison/MedianOfThreeQuickSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/MedianOfThreeQuickSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/MergeSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/MergeSorterTests.cs index 7019b3fb..08f64c72 100644 --- a/Algorithms.Tests/Sorters/Comparison/MergeSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/MergeSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/MiddlePointQuickSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/MiddlePointQuickSorterTests.cs index 69dc19ba..85d675ed 100644 --- a/Algorithms.Tests/Sorters/Comparison/MiddlePointQuickSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/MiddlePointQuickSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/PancakeSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/PancakeSorterTests.cs index a47cdef6..4ea5c8a9 100644 --- a/Algorithms.Tests/Sorters/Comparison/PancakeSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/PancakeSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/RandomPivotQuickSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/RandomPivotQuickSorterTests.cs index 1954e040..6da2b6c5 100644 --- a/Algorithms.Tests/Sorters/Comparison/RandomPivotQuickSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/RandomPivotQuickSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/SelectionSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/SelectionSorterTests.cs index 0af23844..f6fbebfe 100644 --- a/Algorithms.Tests/Sorters/Comparison/SelectionSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/SelectionSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/ShellSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/ShellSorterTests.cs index cac73054..083930c3 100644 --- a/Algorithms.Tests/Sorters/Comparison/ShellSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/ShellSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; diff --git a/Algorithms.Tests/Sorters/Comparison/TimSorterTests.cs b/Algorithms.Tests/Sorters/Comparison/TimSorterTests.cs index 822ac789..582ed27c 100755 --- a/Algorithms.Tests/Sorters/Comparison/TimSorterTests.cs +++ b/Algorithms.Tests/Sorters/Comparison/TimSorterTests.cs @@ -1,8 +1,5 @@ -using System; -using System.Linq; using Algorithms.Sorters.Comparison; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Comparison; @@ -55,7 +52,7 @@ public static void SmallChunks() var min = testArray.Min(); correctArray[0] = max; - correctArray[800-1] = min; + correctArray[800 - 1] = min; testArray[0] = max; testArray[800 - 1] = min; diff --git a/Algorithms.Tests/Sorters/External/ExternalMergeSorterTests.cs b/Algorithms.Tests/Sorters/External/ExternalMergeSorterTests.cs index 06d9a8d2..32e55ec2 100644 --- a/Algorithms.Tests/Sorters/External/ExternalMergeSorterTests.cs +++ b/Algorithms.Tests/Sorters/External/ExternalMergeSorterTests.cs @@ -1,9 +1,6 @@ -using System; using Algorithms.Sorters.External; using Algorithms.Sorters.External.Storages; using Algorithms.Tests.Helpers; -using NUnit.Framework; -using NUnit.Framework.Internal; namespace Algorithms.Tests.Sorters.External; diff --git a/Algorithms.Tests/Sorters/Integer/BucketSorterTests.cs b/Algorithms.Tests/Sorters/Integer/BucketSorterTests.cs index 4506b480..49c771c8 100644 --- a/Algorithms.Tests/Sorters/Integer/BucketSorterTests.cs +++ b/Algorithms.Tests/Sorters/Integer/BucketSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Integer; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Integer; diff --git a/Algorithms.Tests/Sorters/Integer/CountingSorterTests.cs b/Algorithms.Tests/Sorters/Integer/CountingSorterTests.cs index c436ae1b..dfb3d991 100644 --- a/Algorithms.Tests/Sorters/Integer/CountingSorterTests.cs +++ b/Algorithms.Tests/Sorters/Integer/CountingSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Integer; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Integer; diff --git a/Algorithms.Tests/Sorters/Integer/RadixSorterTests.cs b/Algorithms.Tests/Sorters/Integer/RadixSorterTests.cs index 7866613a..af5b7775 100644 --- a/Algorithms.Tests/Sorters/Integer/RadixSorterTests.cs +++ b/Algorithms.Tests/Sorters/Integer/RadixSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.Integer; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.Integer; diff --git a/Algorithms.Tests/Sorters/String/MsdRadixStringSorterTests.cs b/Algorithms.Tests/Sorters/String/MsdRadixStringSorterTests.cs index 301e633c..3c50b84d 100644 --- a/Algorithms.Tests/Sorters/String/MsdRadixStringSorterTests.cs +++ b/Algorithms.Tests/Sorters/String/MsdRadixStringSorterTests.cs @@ -1,7 +1,5 @@ -using System; using Algorithms.Sorters.String; using Algorithms.Tests.Helpers; -using NUnit.Framework; namespace Algorithms.Tests.Sorters.String; diff --git a/Algorithms.Tests/Sorters/Utils/GallopingStrategyTests.cs b/Algorithms.Tests/Sorters/Utils/GallopingStrategyTests.cs index 2c7e6050..86414f49 100644 --- a/Algorithms.Tests/Sorters/Utils/GallopingStrategyTests.cs +++ b/Algorithms.Tests/Sorters/Utils/GallopingStrategyTests.cs @@ -1,6 +1,4 @@ using Algorithms.Sorters.Utils; -using NUnit.Framework; -using System.Collections.Generic; namespace Algorithms.Tests.Sorters.Utils { @@ -9,7 +7,7 @@ public class GallopingStrategyTests { private readonly IComparer comparer = Comparer.Default; -[Test] + [Test] public void GallopLeft_KeyPresent_ReturnsCorrectIndex() { var array = new[] { 1, 2, 3, 4, 5 }; diff --git a/Algorithms.Tests/Stack/BalancedParenthesesCheckerTests.cs b/Algorithms.Tests/Stack/BalancedParenthesesCheckerTests.cs index 64c3876d..ed692f8a 100644 --- a/Algorithms.Tests/Stack/BalancedParenthesesCheckerTests.cs +++ b/Algorithms.Tests/Stack/BalancedParenthesesCheckerTests.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Stack; -using NUnit.Framework; namespace Algorithms.Tests.Stack { @@ -9,7 +7,7 @@ public class BalancedParenthesesCheckerTests { public static bool IsBalanced(string expression) { - var checker = new BalancedParenthesesChecker(); + var checker = new BalancedParenthesesChecker(); return checker.IsBalanced(expression); } @@ -22,11 +20,11 @@ public void IsBalanced_EmptyString_ThrowsArgumentException() // Act & Assert var ex = Assert.Throws(() => IsBalanced(expression)); - if(ex!=null) + if (ex != null) { Assert.That(ex.Message, Is.EqualTo("The input expression cannot be null or empty.")); } - + } [Test] diff --git a/Algorithms.Tests/Stack/NextGreaterElementTests.cs b/Algorithms.Tests/Stack/NextGreaterElementTests.cs index 09df3649..34aaa2b8 100644 --- a/Algorithms.Tests/Stack/NextGreaterElementTests.cs +++ b/Algorithms.Tests/Stack/NextGreaterElementTests.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Stack; -using NUnit.Framework; namespace Algorithms.Tests.Stack { diff --git a/Algorithms.Tests/Stack/ReverseStackTests.cs b/Algorithms.Tests/Stack/ReverseStackTests.cs index 8312efac..10238fb4 100644 --- a/Algorithms.Tests/Stack/ReverseStackTests.cs +++ b/Algorithms.Tests/Stack/ReverseStackTests.cs @@ -1,7 +1,4 @@ using Algorithms.Stack; -using NUnit.Framework; -using System.Collections.Generic; - namespace Algorithms.Tests.Stack { diff --git a/Algorithms.Tests/Strings/GeneralStringAlgorithmsTests.cs b/Algorithms.Tests/Strings/GeneralStringAlgorithmsTests.cs index 7c4849ba..95fe2264 100644 --- a/Algorithms.Tests/Strings/GeneralStringAlgorithmsTests.cs +++ b/Algorithms.Tests/Strings/GeneralStringAlgorithmsTests.cs @@ -1,6 +1,4 @@ -using System; using Algorithms.Strings; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/PalindromeTests.cs b/Algorithms.Tests/Strings/PalindromeTests.cs index aa573a15..8d003d36 100644 --- a/Algorithms.Tests/Strings/PalindromeTests.cs +++ b/Algorithms.Tests/Strings/PalindromeTests.cs @@ -1,5 +1,4 @@ using Algorithms.Strings; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/PatternMatching/BitapTests.cs b/Algorithms.Tests/Strings/PatternMatching/BitapTests.cs index 133d63f0..a9505b1c 100644 --- a/Algorithms.Tests/Strings/PatternMatching/BitapTests.cs +++ b/Algorithms.Tests/Strings/PatternMatching/BitapTests.cs @@ -1,6 +1,4 @@ -using System; -using Algorithms.Strings.PatternMatching; -using NUnit.Framework; +using Algorithms.Strings.PatternMatching; namespace Algorithms.Tests.Strings.PatternMatching; diff --git a/Algorithms.Tests/Strings/PatternMatching/BoyerMoreTests.cs b/Algorithms.Tests/Strings/PatternMatching/BoyerMoreTests.cs index 8aaee455..b6f0cfce 100644 --- a/Algorithms.Tests/Strings/PatternMatching/BoyerMoreTests.cs +++ b/Algorithms.Tests/Strings/PatternMatching/BoyerMoreTests.cs @@ -1,6 +1,4 @@ -using Algorithms.Strings; using Algorithms.Strings.PatternMatching; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/PatternMatching/KnuthMorrisPrattSearcherTests.cs b/Algorithms.Tests/Strings/PatternMatching/KnuthMorrisPrattSearcherTests.cs index 3271ea65..3efabc20 100644 --- a/Algorithms.Tests/Strings/PatternMatching/KnuthMorrisPrattSearcherTests.cs +++ b/Algorithms.Tests/Strings/PatternMatching/KnuthMorrisPrattSearcherTests.cs @@ -1,6 +1,4 @@ -using Algorithms.Strings; using Algorithms.Strings.PatternMatching; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/PatternMatching/NaiveStringSearchTests.cs b/Algorithms.Tests/Strings/PatternMatching/NaiveStringSearchTests.cs index 954aca50..da93a98c 100644 --- a/Algorithms.Tests/Strings/PatternMatching/NaiveStringSearchTests.cs +++ b/Algorithms.Tests/Strings/PatternMatching/NaiveStringSearchTests.cs @@ -1,7 +1,4 @@ -using System.Linq; -using Algorithms.Strings; using Algorithms.Strings.PatternMatching; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/PatternMatching/RabinKarpTests.cs b/Algorithms.Tests/Strings/PatternMatching/RabinKarpTests.cs index 71c6b8d2..a826bb24 100644 --- a/Algorithms.Tests/Strings/PatternMatching/RabinKarpTests.cs +++ b/Algorithms.Tests/Strings/PatternMatching/RabinKarpTests.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using Algorithms.Strings; using Algorithms.Strings.PatternMatching; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/PatternMatching/WildCardMatcherTests.cs b/Algorithms.Tests/Strings/PatternMatching/WildCardMatcherTests.cs index 5361557a..1b7b6146 100644 --- a/Algorithms.Tests/Strings/PatternMatching/WildCardMatcherTests.cs +++ b/Algorithms.Tests/Strings/PatternMatching/WildCardMatcherTests.cs @@ -1,5 +1,4 @@ using Algorithms.Strings.PatternMatching; -using NUnit.Framework; namespace Algorithms.Tests.Strings.PatternMatching; diff --git a/Algorithms.Tests/Strings/PatternMatching/ZblockSubstringSearchTest.cs b/Algorithms.Tests/Strings/PatternMatching/ZblockSubstringSearchTest.cs index b76766d6..8d1e37db 100644 --- a/Algorithms.Tests/Strings/PatternMatching/ZblockSubstringSearchTest.cs +++ b/Algorithms.Tests/Strings/PatternMatching/ZblockSubstringSearchTest.cs @@ -1,6 +1,4 @@ -using Algorithms.Strings; using Algorithms.Strings.PatternMatching; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/PermutationTests.cs b/Algorithms.Tests/Strings/PermutationTests.cs index db160fc3..134514a3 100644 --- a/Algorithms.Tests/Strings/PermutationTests.cs +++ b/Algorithms.Tests/Strings/PermutationTests.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; using Algorithms.Numeric; using Algorithms.Strings; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/Similarity/CosineSimilarityTests.cs b/Algorithms.Tests/Strings/Similarity/CosineSimilarityTests.cs index 0770e913..3d612b1f 100644 --- a/Algorithms.Tests/Strings/Similarity/CosineSimilarityTests.cs +++ b/Algorithms.Tests/Strings/Similarity/CosineSimilarityTests.cs @@ -1,6 +1,4 @@ -using System; -using Algorithms.Strings.Similarity; -using NUnit.Framework; +using Algorithms.Strings.Similarity; namespace Algorithms.Tests.Strings.Similarity; diff --git a/Algorithms.Tests/Strings/Similarity/DamerauLevenshteinDistanceTests.cs b/Algorithms.Tests/Strings/Similarity/DamerauLevenshteinDistanceTests.cs index 5f522aff..28c0de87 100644 --- a/Algorithms.Tests/Strings/Similarity/DamerauLevenshteinDistanceTests.cs +++ b/Algorithms.Tests/Strings/Similarity/DamerauLevenshteinDistanceTests.cs @@ -1,5 +1,4 @@ using Algorithms.Strings.Similarity; -using NUnit.Framework; namespace Algorithms.Tests.Strings.Similarity; @@ -21,7 +20,7 @@ public void Calculate_CompletelyDifferentStrings_ReturnsLengthOfLongestString() var str1 = "abc"; var str2 = "xyz"; var result = DamerauLevenshteinDistance.Calculate(str1, str2); - Assert.That(result, Is.EqualTo(3),"Completely different strings should have a Damerau-Levenshtein distance equal to the length of the longest string."); + Assert.That(result, Is.EqualTo(3), "Completely different strings should have a Damerau-Levenshtein distance equal to the length of the longest string."); } [Test] @@ -30,7 +29,7 @@ public void Calculate_OneEmptyString_ReturnsLengthOfOtherString() var str1 = "test"; var str2 = ""; var result = DamerauLevenshteinDistance.Calculate(str1, str2); - Assert.That(result, Is.EqualTo(4),"One empty string should have a Damerau-Levenshtein distance equal to the length of the other string."); + Assert.That(result, Is.EqualTo(4), "One empty string should have a Damerau-Levenshtein distance equal to the length of the other string."); } [Test] diff --git a/Algorithms.Tests/Strings/Similarity/HammingDistanceTests.cs b/Algorithms.Tests/Strings/Similarity/HammingDistanceTests.cs index 4970ae03..3b2eb564 100644 --- a/Algorithms.Tests/Strings/Similarity/HammingDistanceTests.cs +++ b/Algorithms.Tests/Strings/Similarity/HammingDistanceTests.cs @@ -1,6 +1,3 @@ -using Algorithms.Strings; -using NUnit.Framework; -using System; using Algorithms.Strings.Similarity; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/Similarity/JaccardDistanceTests.cs b/Algorithms.Tests/Strings/Similarity/JaccardDistanceTests.cs index bfa04f35..fc11966d 100644 --- a/Algorithms.Tests/Strings/Similarity/JaccardDistanceTests.cs +++ b/Algorithms.Tests/Strings/Similarity/JaccardDistanceTests.cs @@ -1,7 +1,4 @@ -using System; -using Algorithms.Strings.Similarity; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Strings.Similarity; namespace Algorithms.Tests.Strings.Similarity; diff --git a/Algorithms.Tests/Strings/Similarity/JaccardSimilarityTests.cs b/Algorithms.Tests/Strings/Similarity/JaccardSimilarityTests.cs index eb33c6b7..9d08b06a 100644 --- a/Algorithms.Tests/Strings/Similarity/JaccardSimilarityTests.cs +++ b/Algorithms.Tests/Strings/Similarity/JaccardSimilarityTests.cs @@ -1,7 +1,4 @@ -using System; -using Algorithms.Strings.Similarity; -using FluentAssertions; -using NUnit.Framework; +using Algorithms.Strings.Similarity; namespace Algorithms.Tests.Strings.Similarity; diff --git a/Algorithms.Tests/Strings/Similarity/JaroSimilarityTests.cs b/Algorithms.Tests/Strings/Similarity/JaroSimilarityTests.cs index 0329be44..ae665d17 100644 --- a/Algorithms.Tests/Strings/Similarity/JaroSimilarityTests.cs +++ b/Algorithms.Tests/Strings/Similarity/JaroSimilarityTests.cs @@ -1,7 +1,4 @@ -using Algorithms.Strings; using Algorithms.Strings.Similarity; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/Similarity/JaroWinklerDistanceTests.cs b/Algorithms.Tests/Strings/Similarity/JaroWinklerDistanceTests.cs index 5f9c1cab..09606178 100644 --- a/Algorithms.Tests/Strings/Similarity/JaroWinklerDistanceTests.cs +++ b/Algorithms.Tests/Strings/Similarity/JaroWinklerDistanceTests.cs @@ -1,7 +1,4 @@ -using Algorithms.Strings; using Algorithms.Strings.Similarity; -using FluentAssertions; -using NUnit.Framework; namespace Algorithms.Tests.Strings; diff --git a/Algorithms.Tests/Strings/Similarity/OptimalStringAlignmentTests.cs b/Algorithms.Tests/Strings/Similarity/OptimalStringAlignmentTests.cs index 48199013..d9483b7f 100644 --- a/Algorithms.Tests/Strings/Similarity/OptimalStringAlignmentTests.cs +++ b/Algorithms.Tests/Strings/Similarity/OptimalStringAlignmentTests.cs @@ -1,7 +1,4 @@ using Algorithms.Strings.Similarity; -using FluentAssertions; -using NUnit.Framework; -using System; namespace Algorithms.Tests.Strings.Similarity {