-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8cad63
commit bb1df6f
Showing
6 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 15 additions & 2 deletions
17
src/test/java/ch/akop/weathercloud/scraper/weathercloud/ScraperTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
package ch.akop.weathercloud.scraper.weathercloud; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import java.time.Duration; | ||
import java.time.temporal.ChronoUnit; | ||
|
||
@Slf4j | ||
class ScraperTest { | ||
|
||
// run manually | ||
@Test | ||
//@Test | ||
void manual_test() { | ||
var testee = new Scraper(); | ||
|
||
var result = testee.scrape("7003523537"); | ||
|
||
} | ||
|
||
//@Test | ||
void manual_scheduler_test() throws InterruptedException { | ||
var testee = new Scraper(); | ||
|
||
new Scraper().scrape$("7003523537", Duration.of(5, ChronoUnit.MINUTES)) | ||
.subscribe(weather -> log.info("In Oensingen, we had {}", weather.getOuterTemperatur())); | ||
|
||
Thread.sleep(60000); | ||
} | ||
|
||
} |