Esempio n. 1
0
        public void DownloadJournals_returns_an_empty_list_when_there_is_no_valid_journal_data()
        {
            var parser = new JournalTocsJsonParser();

            // Act
            var journals = parser.Parse(new List <string> {
                InvalidJournalTocsJson()
            });

            Assert.Equal(0, journals.Count);
        }
Esempio n. 2
0
        public void DownloadJournals_returns_an_empty_list_when_there_is_an_error_message()
        {
            var parser = new JournalTocsJsonParser();

            // Act
            var journals = parser.Parse(new List <string> {
                ErrorJson()
            });

            Assert.Equal(0, journals.Count);
        }
Esempio n. 3
0
        public void DownloadJournals_parses_journal_json_and_converts_it_to_Journals()
        {
            var parser = new JournalTocsJsonParser();

            // Act
            var journals = parser.Parse(new List <string> {
                JournalTocsJson()
            });

            // Assert
            Assert.Equal(2, journals.Count);
            Assert.Equal("Revista de Investigación en Educación", journals.First().Title);
            Assert.Equal("1697-5200", journals.First().ISSN);
            Assert.Equal("1891-5396", journals.Last().ISSN);
        }