private void TestExtractor( string input, IExtractor extractor, int maxMilliseconds, string valueToValidate) { DateTime startTime = DateTime.Now; IEnumerable <InfoItem> infoItems = extractor.ExtractInfo(input); DateTime endTime = DateTime.Now; Assert.IsNotNull(infoItems); Assert.IsTrue(infoItems.Count() > 0); Assert.IsTrue((endTime - startTime).TotalMilliseconds < maxMilliseconds); Assert.AreEqual(infoItems.First().Value, valueToValidate); }