Streamline uncertainty handling by modifying data structures and methods, replacing `SerNo` with a generic `val` array. Introduce `PreviousResultsDlgUncertainty` for expanded result management, and incorporate Excel template handling for uncertainty calculations. Ensure backward compatibility while refining code for clarity and efficiency.
24 lines
564 B
C#
24 lines
564 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using JetBrains.Annotations;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using Math = Results.Uncertainty.Calculation.Math;
|
|
|
|
namespace TBFTests.Uncertainty.Calculation
|
|
{
|
|
[TestClass]
|
|
[TestSubject(typeof(Math))]
|
|
public class MathTest
|
|
{
|
|
|
|
[TestMethod]
|
|
public void AritmeticMeanTest()
|
|
{
|
|
IList<double> list = new List<double>(){1,2,3,4,5};
|
|
|
|
double result = Math.Average(list);
|
|
|
|
Assert.AreEqual(3.0d, result);
|
|
}
|
|
}
|
|
} |