2 * Copyright (c) 2010-2021 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.Test;
21 import org.openhab.binding.ahawastecollection.internal.CollectionDate.WasteType;
24 * @author Sönke Küper - Initial contribution
27 public class AhaCollectionScheduleTest {
30 public void testGetValuesForHannoverCity() throws Exception {
31 final AhaCollectionScheduleImpl schedule = new AhaCollectionScheduleImpl("Hannover",
32 "02095@Oesterleystr.+/+Südstadt@Südstadt", "10", "", "02095-0010+");
33 final Map<WasteType, CollectionDate> dates = schedule.getCollectionDates();
34 // No bio waste is collected here
35 assertEquals(3, dates.size());
39 public void testGetValuesForRegion() throws Exception {
40 final AhaCollectionScheduleImpl schedule = new AhaCollectionScheduleImpl("Lehrte",
41 "70185@Haselnussweg+/+Hämelerwald@Hämelerwald", "12", "", "70185-0012+");
42 final Map<WasteType, CollectionDate> dates = schedule.getCollectionDates();
43 // All four waste types are collected here.
44 assertEquals(4, dates.size());