public void AllLanguagesTest()
        {
            var testFile = Path.Join("Test Data", "MultilanguageData.xml");
            var reader   = new XmlTvReader(testFile);
            var results  = reader.GetLanguages();

            Assert.NotNull(results);
            Assert.Equal(2, results.Count);
            Assert.Equal("en", results[0].Name);
            Assert.Equal(11, results[0].Relevance);
            Assert.Equal("es", results[1].Name);
            Assert.Equal(3, results[1].Relevance);
        }
Exemplo n.º 2
0
        public void Should_Return_All_Languages()
        {
            var testFile          = Path.GetFullPath(@"MultilanguageData.xml");
            var reader            = new XmlTvReader(testFile);
            var cancellationToken = new CancellationToken();

            var results = reader.GetLanguages(cancellationToken);

            Assert.IsNotNull(results);

            foreach (var result in results)
            {
                Console.WriteLine("{0} - {1}", result.Name, result.Relevance);
            }

            Assert.AreEqual(2, results.Count);
            Assert.AreEqual("en", results[0].Name);
            Assert.AreEqual(11, results[0].Relevance);
            Assert.AreEqual("es", results[1].Name);
            Assert.AreEqual(3, results[1].Relevance);
        }