﻿using FTM.Commons;
using NUnit.Framework;

namespace FTM.Tests
{
	[TestFixture()]
	public class CommonsTests
	{
		[Test()]
		public void TestConverter()
		{
			MeasurementSystem MS = MeasurementSystem.Metric;

			Assert.AreEqual (MS.ConvertHeightFromSystem (1.32), 1.32, "CI > CI convertion");
		}


		[Test()]
		public void CalculatorTest()
		{
			var _Calc = new ConsumptionCalculator (CalculationFormula.CFMifflinStJeore, Sex.Male);
			var EDC = _Calc.CalculateRecommendedEDCNorm (27.0 + 11 / 12, 1.75, 110, WorkType.NonActive);
			System.Console.WriteLine (EDC);
			Assert.Greater (EDC, 0);

			EDC = _Calc.CalculateLossEDCNorm (27.0 + 11 / 12, 1.75, 110, WorkType.NonActive);
			System.Console.WriteLine (EDC);

			Assert.Greater (EDC, 0);
		}

	}
}

