public void Constraints_Test() { XDocument xml = XDocument.Load(@"C:\Users\maxei\source\repos\EAST_ADL_METRICS\EAST_ADL_METRICS_Test\TestFiles\Constraints.eaxml"); string elementName = "FunctionType2"; Metric expectedMetric = new Metric { Name = "Constraints", Category = "Size", Type = "FUNCTION-TYPE", Nested = false, // 1 timing constraint and 1 safety constraint Value = 2 }; Metric actualMetric = constraint.Constraints(xml, elementName); Assert.AreEqual(expectedMetric.Value, actualMetric.Value); }