1
0
mirror of https://github.com/akaessens/NoFbEventScraper synced 2025-06-05 23:29:13 +02:00

MinSdk down to 23, replace ZonedDateTime with Date

This commit is contained in:
akaessens
2020-08-30 21:40:14 +02:00
parent 76f56434e8
commit 8b5263db63
4 changed files with 36 additions and 36 deletions

View File

@ -42,15 +42,16 @@ public class ScraperUnitTest {
FbScraper scraper = new FbScraper(null, "");
String exp = "2020-10-23T05:00+02:00";
String in = "2020-10-23T05:00:00+0200";
String act = scraper.toZonedDateTime(in).toString();
String in = "2020-01-01T12:00:00+0100";
String exp = "Mi., 01 Jan. 2020 12:00 MEZ";
String act = FbEvent.dateTimeToString(scraper.parseToDate(in));
assertEquals(exp, act);
exp = null;
exp = "";
in = "";
ZonedDateTime act2 = scraper.toZonedDateTime(in);
String act2 = FbEvent.dateTimeToString(scraper.parseToDate(in));
assertEquals(exp, act2);
}