Добавил тесты

This commit is contained in:
KhasanovAM
2026-03-11 15:48:28 +04:00
parent 4fd2ea4aea
commit f6a8e8a2e7
8 changed files with 397 additions and 48 deletions

View File

@@ -0,0 +1,44 @@
using Xunit;
namespace AppTesting
{
public class ArrayProcTests
{
// Путь 1
[Fact]
public void ArrayProc_Way_1_1()
{
double[] input = new double[0];
var result = Program.ArrayProc(input);
Assert.Null(result);
}
[Fact]
public void ArrayProc_Way_1_2()
{
double[] input = new double[] { 5.0 };
var result = Program.ArrayProc(input);
Assert.Null(result);
}
[Fact]
public void ArrayProc_Way_1_3()
{
double[] input = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0 };
var result = Program.ArrayProc(input);
Assert.Null(result);
}
[Theory]
[InlineData(new double[] { })]
[InlineData(new double[] { 10.0 })]
[InlineData(new double[] { 1.0, 2.0, 3.0 })]
[InlineData(new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 })]
public void ArrayProc_Way_1_4(double[] input)
{
var result = Program.ArrayProc(input);
Assert.Null(result);
}
}
}