37 lines
1.1 KiB
C#
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);
|
||
|
}
|
||
|
}
|
||
|
}
|