This commit is contained in:
27
Tests/Interatif/RecursionTest.cs
Normal file
27
Tests/Interatif/RecursionTest.cs
Normal file
@ -0,0 +1,27 @@
|
||||
namespace Tests.Recursion;
|
||||
|
||||
public class RecursionTest
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("abcdef132", 0, true)]
|
||||
[InlineData("!abcdef", 0, false)]
|
||||
[InlineData("!abcdef", 1, true)]
|
||||
[InlineData("abcdef!", 15, true)]
|
||||
|
||||
public void IsAlphanumTest(string s, int i, bool expected)
|
||||
{
|
||||
bool actual = Iteration.Recursion.IsAlphanum(s, i);
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("42", 2, "24")]
|
||||
[InlineData("123", 3, "321")]
|
||||
[InlineData("ABcdeF",6, "FedcBA")]
|
||||
|
||||
public void ReverseStrTest(string source, int lenght, string expected)
|
||||
{
|
||||
string actual = Iteration.Recursion.ReverseStr(source, lenght);
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
}
|
6
Tests/Stream/StreamTest.cs
Normal file
6
Tests/Stream/StreamTest.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace Tests.Stream;
|
||||
|
||||
public class StreamTest
|
||||
{
|
||||
|
||||
}
|
Reference in New Issue
Block a user