d9660c4d72e5ae363776d3e87bdc7a2dbd14c8a1
1 package be
.nikiroo
.gofetch
.test
;
4 import java
.io
.IOException
;
5 import java
.io
.InputStream
;
6 import java
.net
.MalformedURLException
;
8 import java
.util
.HashMap
;
11 import be
.nikiroo
.gofetch
.support
.Slashdot
;
12 import be
.nikiroo
.gofetch
.support
.Type
;
14 public class TestSlashdot
extends TestBase
{
16 static private Map
<URL
, File
> getMap() throws MalformedURLException
{
17 Map
<URL
, File
> map
= new HashMap
<URL
, File
>();
19 map
.put(new URL("https://slashdot.org/"), new File("index.html"));
22 "https://developers.slashdot.org/story/18/09/06/2024232/software-developers-are-now-more-valuable-to-companies-than-money-says-survey"),
24 "developers.slashdot.org/story_18_09_06_2024232_software-developers-are-now-more-valuable-to-companies-than-money-says-survey.html"));
26 "https://games.slashdot.org/story/18/09/06/1921222/eve-online-studio-acquired-by-korean-mmo-maker"),
28 "games.slashdot.org/story_18_09_06_1921222_eve-online-studio-acquired-by-korean-mmo-maker.html"));
30 "https://games.slashdot.org/story/18/09/06/2146237/valve-explains-how-it-decides-whos-a-straight-up-troll-publishing-video-games-on-steam"),
32 "games.slashdot.org/story_18_09_06_2146237_valve-explains-how-it-decides-whos-a-straight-up-troll-publishing-video-games-on-steam.html"));
34 "https://hardware.slashdot.org/story/18/09/06/1719243/robot-boat-sails-into-history-by-finishing-atlantic-crossing"),
36 "hardware.slashdot.org/story_18_09_06_1719243_robot-boat-sails-into-history-by-finishing-atlantic-crossing.html"));
38 "https://hardware.slashdot.org/story/18/09/06/2058201/mit-graduate-creates-robot-that-swims-through-pipes-to-find-out-if-theyre-leaking"),
40 "hardware.slashdot.org/story_18_09_06_2058201_mit-graduate-creates-robot-that-swims-through-pipes-to-find-out-if-theyre-leaking.html"));
42 "https://it.slashdot.org/story/18/09/07/0247228/380000-card-payments-compromised-in-british-airways-breach"),
44 "it.slashdot.org/story_18_09_07_0247228_380000-card-payments-compromised-in-british-airways-breach.html"));
46 "https://mobile.slashdot.org/story/18/09/06/235254/icelanders-seek-to-keep-remote-nordic-peninsula-digital-free"),
48 "mobile.slashdot.org/story_18_09_06_235254_icelanders-seek-to-keep-remote-nordic-peninsula-digital-free.html"));
50 "https://news.slashdot.org/story/18/09/06/1558206/computer-chips-are-still-made-in-usa"),
52 "news.slashdot.org/story_18_09_06_1558206_computer-chips-are-still-made-in-usa.html"));
54 "https://news.slashdot.org/story/18/09/06/2043213/professor-who-coined-term-net-neutrality-thinks-its-time-to-break-up-facebook"),
56 "news.slashdot.org/story_18_09_06_2043213_professor-who-coined-term-net-neutrality-thinks-its-time-to-break-up-facebook.html"));
58 "https://politics.slashdot.org/story/18/09/06/2137245/blockchains-are-not-safe-for-voting-concludes-nap-report"),
60 "politics.slashdot.org/story_18_09_06_2137245_blockchains-are-not-safe-for-voting-concludes-nap-report.html"));
62 "https://science.slashdot.org/story/18/09/06/2153223/study-finds-probiotics-not-as-beneficial-for-gut-health-as-previously-thought"),
64 "science.slashdot.org/story_18_09_06_2153223_study-finds-probiotics-not-as-beneficial-for-gut-health-as-previously-thought.html"));
66 "https://tech.slashdot.org/story/18/09/06/1839242/google-investigating-issue-with-blurry-fonts-on-new-chrome-69"),
68 "tech.slashdot.org/story_18_09_06_1839242_google-investigating-issue-with-blurry-fonts-on-new-chrome-69.html"));
70 "https://tech.slashdot.org/story/18/09/06/1954253/400000-websites-vulnerable-through-exposed-git-directories"),
72 "tech.slashdot.org/story_18_09_06_1954253_400000-websites-vulnerable-through-exposed-git-directories.html"));
74 "https://tech.slashdot.org/story/18/09/06/205221/ive-seen-the-future-of-consumer-ai-and-it-doesnt-have-one"),
76 "tech.slashdot.org/story_18_09_06_205221_ive-seen-the-future-of-consumer-ai-and-it-doesnt-have-one.html"));
78 "https://yro.slashdot.org/story/18/09/06/1651255/tor-browser-gets-a-redesign-switches-to-new-firefox-quantum-engine"),
80 "yro.slashdot.org/story_18_09_06_1651255_tor-browser-gets-a-redesign-switches-to-new-firefox-quantum-engine.html"));
85 public TestSlashdot(String
[] args
) {
86 super(new Slashdot() {
88 protected InputStream
open(URL url
) throws IOException
{
89 return doOpen(this, getMap(), url
);
93 public Type
getType() {