Exemplo n.º 1
0
        public void EuropePmcSearch_NoResult()
        {
            Boolean       assertion = false;
            List <string> origin    = new List <string>();

            origin.Add("Asd asd ASd jasdfnaLasddasda");
            DocumentStatistics documentStatistics = new DocumentStatistics(origin);
            EuropaPMCSearch    europaPMCSearch    = new EuropaPMCSearch(new Uri("https://www.ebi.ac.uk/europepmc/webservices/rest/search?"));

            europaPMCSearch.Check(documentStatistics);

            if (documentStatistics.getPossiblePlagiates().Count == 0)
            {
                assertion = true;
            }
            Assert.True(assertion);
        }
Exemplo n.º 2
0
        public void EuropePmcSearch_SourceFound()
        {
            Boolean       assertion = false;
            List <string> origin    = new List <string>();

            origin.Add("Tonight, museums across Europe will take part in the Long Night of Museums");
            DocumentStatistics documentStatistics = new DocumentStatistics(origin);
            EuropaPMCSearch    europaPMCSearch    = new EuropaPMCSearch(new Uri("https://www.ebi.ac.uk/europepmc/webservices/rest/search?"));

            europaPMCSearch.Check(documentStatistics);
            foreach (Plagiat <String> source in documentStatistics.getPossiblePlagiates())
            {
                if (source.Source == "http://europepmc.org/articles/PMC1298459?pdf=render")
                {
                    assertion = true;
                }
            }
            Assert.True(assertion);
        }