Ejemplo n.º 1
0
        public void ParsePronounciation(string wordFile, int expectedCount)
        {
            var    testDir  = TestContext.CurrentContext.TestDirectory;
            string fullPath = Path.Combine(testDir, wordFile);

            var xml       = XDocument.Load(fullPath);
            var waveFiles = MariamWebseter.ParseAudios(xml.ToString());

            Assert.AreEqual(expectedCount, waveFiles.Count());
        }
Ejemplo n.º 2
0
        public void ParseXml(string wordFile, int expectedCount)
        {
            var    testDir  = TestContext.CurrentContext.TestDirectory;
            string fullPath = Path.Combine(testDir, wordFile);

            var xml         = XDocument.Load(fullPath);
            var definitions = MariamWebseter.ParseDefinitions(xml.ToString());

            Assert.AreEqual(expectedCount, definitions.Count());
        }
Ejemplo n.º 3
0
        public void ParseAndDownload(string wordFile, int expectedCount)
        {
            var    testDir  = TestContext.CurrentContext.TestDirectory;
            string fullPath = Path.Combine(testDir, wordFile);

            Directory.SetCurrentDirectory(testDir);

            var xml       = XDocument.Load(fullPath);
            var waveFiles = MariamWebseter.ParseAudios(xml.ToString());

            GenericWebHookCSharp.DownloadAndUpdateAudio(waveFiles.FirstOrDefault()).Wait();

            Assert.AreEqual(expectedCount, waveFiles.Count());
        }