2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.ahawastecollection.internal;
15 import static org.junit.jupiter.api.Assertions.assertEquals;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.junit.jupiter.api.Disabled;
21 import org.junit.jupiter.api.Test;
22 import org.openhab.binding.ahawastecollection.internal.CollectionDate.WasteType;
25 * @author Sönke Küper - Initial contribution
28 @Disabled("These tests use the real website which may not always be available")
29 public class AhaCollectionScheduleTest {
32 public void testGetValuesForHannoverCity() throws Exception {
33 final AhaCollectionScheduleImpl schedule = new AhaCollectionScheduleImpl("Hannover",
34 "02095@Oesterleystr.+/+Südstadt@Südstadt", "10", "", "02095-0010+");
35 final Map<WasteType, CollectionDate> dates = schedule.getCollectionDates();
36 // No bio waste is collected here
37 assertEquals(3, dates.size());
41 public void testGetValuesForRegion() throws Exception {
42 final AhaCollectionScheduleImpl schedule = new AhaCollectionScheduleImpl("Lehrte",
43 "70185@Haselnussweg+/+Hämelerwald@Hämelerwald", "12", "", "70185-0012+");
44 final Map<WasteType, CollectionDate> dates = schedule.getCollectionDates();
45 // All four waste types are collected here.
46 assertEquals(4, dates.size());