-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCalculationManagerTest.cs
More file actions
38 lines (33 loc) · 975 Bytes
/
Copy pathCalculationManagerTest.cs
File metadata and controls
38 lines (33 loc) · 975 Bytes
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
using Caculation.Module.Provider;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
namespace Caculation.Module.Test.Provider
{
[TestClass]
public class CalculationManagerTest
{
CalculationManager manager;
public CalculationManagerTest()
{
manager = new CalculationManager();
}
[TestMethod]
public void CaculateMedianValueTest()
{
List<double?> dataList = new List<double?>();
dataList.Add(3.5);
dataList.Add(4.5);
dataList.Add(7.5);
dataList.Add(8.5);
dataList.Add(2.5);
dataList.Add(9.5);
dataList.Add(3);
Assert.IsTrue(manager.CaculateMedianValue(dataList) == 4.5);
}
[TestMethod]
public void FindPercentageValueTest()
{
Assert.IsTrue(manager.FindPercentageValue(50,5) == 2.5);
}
}
}