-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayManipulationTests.cs
More file actions
43 lines (38 loc) · 1.08 KB
/
ArrayManipulationTests.cs
File metadata and controls
43 lines (38 loc) · 1.08 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
using FluentAssertions;
using ProblemSolving_HackerRank_.Easy;
using ProblemSolving_HackerRank_.Hard;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HackerRankProblems.Tests.Hard
{
public class ArrayManipulationTests
{
public static IEnumerable<object[]> TestData()
{
yield return new object[] { 10, new List<List<int>>()
{
new List<int>() { 1, 5, 3 } ,
new List<int>() { 4, 8, 7 } ,
new List<int>() { 6, 9, 1 } ,
}, 10 };
yield return new object[] { 5, new List<List<int>>()
{
new List<int>() { 1, 2, 100 } ,
new List<int>() { 2, 5, 100 } ,
new List<int>() { 3, 4, 100 } ,
}, 200 };
}
[Theory]
[MemberData(nameof(TestData))]
public void ArrayManipulation_arrayManipulation_ReturnTheMaxResultSum (int n, List<List<int>> queries, int expectedResult)
{
//Act
var result = ArrayManipulation.arrayManipulation(n, queries);
//Assert
result.Should().Be(expectedResult);
}
}
}