-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1796_Second_largest_digit_in_a_string_Test.cs
More file actions
53 lines (43 loc) · 1.29 KB
/
_1796_Second_largest_digit_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._1796.Second_largest_digit_in_a_string;
namespace _1796.Second_largest_digit_in_a_string.Tests
{
[TestClass()]
public class _1796_Second_largest_digit_in_a_string_Test
{
_1796_Second_largest_digit_in_a_string solution = new _1796_Second_largest_digit_in_a_string();
[TestMethod()]
public void SecondHighest_Test1()
{
// Arrange
string s = "dfa12321afd";
var expected = 2;
// Act
var actual = solution.SecondHighest(s);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void SecondHighest_Test2()
{
// Arrange
string s = "abc1111";
var expected = -1;
// Act
var actual = solution.SecondHighest(s);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void SecondHighest_Test3()
{
// Arrange
string s = "sjhtz8344";
var expected = 4;
// Act
var actual = solution.SecondHighest(s);
// Assert
Assert.AreEqual(expected, actual);
}
}
}