コード例 #1
0
ファイル: TestMorphalou.cs プロジェクト: paColor/Colorization
        private void ValideFichierRef(ColConfWin.IllRule illRuleToUse)
        {
            bool success = true;

            if (File.Exists(fullName))
            {
                using (TextFieldParser csvParser = new TextFieldParser(fullName))
                {
                    csvParser.SetDelimiters(new string[] { ";" });
                    csvParser.HasFieldsEnclosedInQuotes = false;

                    // Skip the row with the column names
                    string headerLine = csvParser.ReadLine();
                    while (!csvParser.EndOfData)
                    {
                        // Read current line fields, pointer moves to the next line.
                        Mot m = new Mot(csvParser.ReadFields());
                    }
                    Config conf = new Config();
                    conf.colors[PhonConfType.phonemes].IllRuleToUse = illRuleToUse;

                    Mot.EnsureCompleteness(conf, true);

                    foreach (Mot m in Mot.mots)
                    {
                        if (!(m.matchSet && m.match))
                        {
                            success = false;
                            Console.WriteLine(m.GetFileString());
                        }
                    }
                }
            }
            Assert.IsTrue(success);
        }