-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy path3SumTest.cs
More file actions
executable file
·33 lines (29 loc) · 1.74 KB
/
3SumTest.cs
File metadata and controls
executable file
·33 lines (29 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Algorithms;
using Xunit;
using System.Collections.Generic;
namespace AlgorithmsTest
{
public class ThreeSumTest
{
[Theory]
[MemberData(nameof(InlineData))]
public void TestMethod(int[] nums, IList<IList<int>> output)
{
Assert.Equal(output, Solution015.ThreeSum(nums));
}
public static IEnumerable<object[]> InlineData
{
get
{
var driverData = new List<object[]>();
int[] nums = new []{-1, 0, 1, 2, -1, -4};
IList<IList<int>> output = new List<IList<int>>() {
new List<int> { -1, 0, 1 },
new List<int> { -1, -1, 2 },
};
driverData.Add(new object[] { nums,output });
return driverData;
}
}
}
}