dem20241130/TestProject1/UnitTest1.cs
loc@loc.loc a68d136790 dwadaw
2024-11-30 12:46:07 +04:00

37 lines
1.1 KiB
C#

namespace TestProject1
{
public class Tests
{
[SetUp]
public void Setup()
{
}
[Test]
public void TestSomeMethod()
{
var expect = -1;
var result = ConsoleApp7.Program.Test();
Assert.AreEqual(expect, result);
}
[Test]
public void TestDllLib()
{
string[] expect = {
"08:00-08:30",
"08:30-09:00",
"09:00-09:30",
"09:30-10:00",
"11:30-12:00"
};
TimeSpan[] startTimes = {new TimeSpan(10, 0, 0), new TimeSpan(11, 0, 0)};
int[] durations = { 60, 30 };
TimeSpan beginWorkingTime = new TimeSpan(8, 0, 0);
TimeSpan endWorkingTime = new TimeSpan(12, 0, 0);
int consultationTime = 30;
var result = SF2022UserNNLib.Calculations.AvailablePeriods(startTimes, durations, beginWorkingTime, endWorkingTime, consultationTime);
Assert.AreEqual(expect, result);
}
}
}