mirror of
https://github.com/KhasanovAMdev/ISTU_TEST_LR1.git
synced 2026-04-03 23:09:36 +04:00
Добавил тесты
This commit is contained in:
44
LR1/AppTesting.Tests/ArrayProcTests.cs
Normal file
44
LR1/AppTesting.Tests/ArrayProcTests.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user