28 lines
722 B
C#
28 lines
722 B
C#
namespace Tests.Interatif;
|
|
|
|
public class IterationTests
|
|
{
|
|
[Theory]
|
|
[InlineData(123, 321)]
|
|
[InlineData(1234, 4321)]
|
|
[InlineData(4, 4)]
|
|
[InlineData(-4, -4)]
|
|
[InlineData(24, 42)]
|
|
[InlineData(-123456, -654321)]
|
|
|
|
public void ReverseintTest(int n, int expected)
|
|
{
|
|
int actual = Iteration.Iterations.Reverseint(n);
|
|
Assert.Equal(expected, actual);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("Clement est le plus beau", "moche", false)]
|
|
[InlineData("Clement est le plus beau", "beau", true)]
|
|
|
|
public void FindSubTest(string s, string sub, bool expected)
|
|
{
|
|
bool actual = Iteration.Iterations.FindSub(s, sub);
|
|
Assert.Equal(expected, actual);
|
|
}
|
|
} |