Improve Google Calendar Logic
This commit is contained in:
@@ -40,6 +40,22 @@ public class TippligaGoogleEventManagerTest {
|
||||
matchdays.forEach(TippligaGoogleEventManager::createOrUpdateEventsForMatchday);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findEventTest() {
|
||||
List<Event> allEvents = getAllEvents(2023);
|
||||
Event event = findEvent(allEvents, 2023, 1, 1, 2);
|
||||
assertEquals(event.getStart(), 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateEventTest() {
|
||||
List<Event> allEvents = getAllEvents(2023);
|
||||
Event event = findEvent(allEvents, 2023, 1, 1, 1);
|
||||
TLWMatchday matchday = new TLWMatchday(2023, 1, 1, 0, "2022-08-05 20:30:00", "", "", "1. Spieltag", 12);
|
||||
updateEvent(event, matchday, matchday.getDeliveryDate(), 1);
|
||||
assertEquals(event.size(), 18);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createOrUpdateEventsForMatchdayWTLPokalTest() {
|
||||
TLWMatchdaysCreator creator = new TLWMatchdaysCreator(2022, 48, "WTL-Pokal");
|
||||
@@ -50,10 +66,9 @@ public class TippligaGoogleEventManagerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateEventTest() {
|
||||
TLWMatchdaysCreator creator = new TLWMatchdaysCreator(2022, 1, "Tippliga");
|
||||
ArrayList<TLWMatchday> matchdays = creator.getMatchdays();
|
||||
createOrUpdateEvent(matchdays.get(28), matchdays.get(28).getDeliveryDate(), 1);
|
||||
public void createOrUpdateEventTest() {
|
||||
TLWMatchday matchday = new TLWMatchday(2023, 1, 1, 0, "2022-08-06 20:30:00", "", "", "1. Spieltag", 12);
|
||||
createOrUpdateEvent(matchday, matchday.getDeliveryDate(), 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user