-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_0718_Maximum_length_of_repeated_subarray_Test.cs
More file actions
41 lines (34 loc) · 1.1 KB
/
_0718_Maximum_length_of_repeated_subarray_Test.cs
File metadata and controls
41 lines (34 loc) · 1.1 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
33
34
35
36
37
38
39
40
41
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Solution._0718.Maximum_length_of_repeated_subarray;
namespace _0718.Maximum_length_of_repeated_subarray.Tests
{
[TestClass()]
public class _0718_Maximum_length_of_repeated_subarray_Test
{
_0718_Maximum_length_of_repeated_subarray solution = new _0718_Maximum_length_of_repeated_subarray();
[TestMethod()]
public void FindLength_Test1()
{
// Arrange
int[] nums1 = { 1, 2, 3, 2, 1 };
int[] nums2 = { 3, 2, 1, 4, 7 };
var expected = 3;
// Act
var actual = solution.FindLength(nums1, nums2);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void FindLength_Test2()
{
// Arrange
int[] nums1 = { 0, 0, 0, 0, 0 };
int[] nums2 = { 0, 0, 0, 0, 0 };
var expected = 5;
// Act
var actual = solution.FindLength(nums1, nums2);
// Assert
Assert.AreEqual(expected, actual);
}
}
}