-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_0387_First_unique_character_in_a_string_Test.cs
More file actions
53 lines (43 loc) · 1.29 KB
/
_0387_First_unique_character_in_a_string_Test.cs
File metadata and controls
53 lines (43 loc) · 1.29 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
42
43
44
45
46
47
48
49
50
51
52
53
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Solution._0387.First_unique_character_in_a_string;
namespace _0387.First_unique_character_in_a_string.Tests
{
[TestClass()]
public class _0387_First_unique_character_in_a_string_Test
{
_0387_First_unique_character_in_a_string solution = new _0387_First_unique_character_in_a_string();
[TestMethod()]
public void FirstUniqChar_Test1()
{
// Arrange
string s = "leetcode";
var expected = 0;
// Act
var actual = solution.FirstUniqChar(s);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void FirstUniqChar_Test2()
{
// Arrange
string s = "loveleetcode";
var expected = 2;
// Act
var actual = solution.FirstUniqChar(s);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void FirstUniqChar_Test3()
{
// Arrange
string s = "aabb";
var expected = -1;
// Act
var actual = solution.FirstUniqChar(s);
// Assert
Assert.AreEqual(expected, actual);
}
}
}