private void TestOneSourceFile(string file, String language) { string fileContents = File.ReadAllText(file); MatchCollection matcher = pattern.Matches(fileContents); foreach (Match match in matcher) { String key = match.Groups[1].Value; String assertMessage = language + " localization for " + key + " message was not found. File " + file; if (MessageLocalization.GetMessage(key, false).StartsWith("No message found for")) { Console.WriteLine(assertMessage); nonLozalizedMessageErrors.Add(assertMessage); } //Assert.IsFalse(MessageLocalization.GetMessage(key, false).StartsWith("No message found for"), assertMessage); } }