public void BLCriteriaTest() { List <FuzzyNumber> costsList = new List <FuzzyNumber> { new FuzzyNumber(1, 2, 3), new FuzzyNumber(4, 5, 6), new FuzzyNumber(7, 8, 9) }; string[] headers = null; int solutionIndex = -1; double[,] expected = new double[, ] { { 1.98, 0 }, { 4.95, 0 }, { 7.92, 7.92 } }; int expectedIndex = 2; double[] probDistr = new double[] { 0.33, 0.33, 0.33 }; double[,] actual = MathOperations.BLCriteria(costsList, ref headers, ref solutionIndex, probDistr); for (int i = 0; i < actual.GetLength(0); i++) { for (int j = 0; j < actual.GetLength(1); j++) { if (expected[i, j] != actual[i, j]) { Assert.Fail($"Values are not equal at [{i}, {j}]"); } } } Assert.AreEqual(expectedIndex, solutionIndex); }