-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1486_XOR_Operation_in_an_array_Test.cs
More file actions
71 lines (58 loc) · 1.63 KB
/
_1486_XOR_Operation_in_an_array_Test.cs
File metadata and controls
71 lines (58 loc) · 1.63 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Solution._1486.XOR_Operation_in_an_array;
namespace _1486.XOR_Operation_in_an_array.Tests
{
[TestClass()]
public class _1486_XOR_Operation_in_an_array_Test
{
_1486_XOR_Operation_in_an_array solution = new _1486_XOR_Operation_in_an_array();
[TestMethod()]
public void XorOperation_Test1()
{
// Arrange
int n = 5;
int start = 0;
var expected = 8;
// Act
var actual = solution.XorOperation(n, start);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void XorOperation_Test2()
{
// Arrange
int n = 4;
int start = 3;
var expected = 8;
// Act
var actual = solution.XorOperation(n, start);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void XorOperation_Test3()
{
// Arrange
int n = 1;
int start = 7;
var expected = 7;
// Act
var actual = solution.XorOperation(n, start);
// Assert
Assert.AreEqual(expected, actual);
}
[TestMethod()]
public void XorOperation_Test4()
{
// Arrange
int n = 10;
int start = 5;
var expected = 2;
// Act
var actual = solution.XorOperation(n, start);
// Assert
Assert.AreEqual(expected, actual);
}
}
}