private void testAllocationResults(AllocationParameters parameters, float[] expectedResult, float expectedTotal) { Allocation allocation = new Allocation(parameters); AllocationResults result = allocation.GetAllocation(); for (int i = 0; i < expectedResult.Length; i++) { Assert.IsTrue(expectedResult[i] == result.Allocation[i]); } Assert.AreEqual(Math.Round(expectedTotal, 2), Math.Round(result.Total, 2)); }