]> git.basschouten.com Git - openhab-addons.git/blob
5c8efbcb4b3ed3fee3e8997441ac16310c7393ca
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.persistence.dynamodb.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.library.types.DecimalType;
17 import org.openhab.core.library.types.OnOffType;
18 import org.openhab.core.library.types.PlayPauseType;
19 import org.openhab.core.library.types.StringType;
20
21 /**
22  *
23  * @author Sami Salonen - Initial contribution
24  *
25  */
26 @NonNullByDefault
27 public class TestStoreMixedTypesLegacyTest extends TestStoreMixedTypesTest {
28
29     public static final boolean LEGACY_MODE = true;
30
31     @Override
32     protected PlayPauseType[] expectedPlayerItem() {
33         return new PlayPauseType[] { PlayPauseType.PAUSE };
34     }
35
36     @Override
37     protected StringType[] expectedStringItem() {
38         return new StringType[] { StringType.valueOf("a1"), StringType.valueOf("b1"), StringType.valueOf("PAUSE") };
39     }
40
41     @Override
42     protected OnOffType[] expectedSwitchItem() {
43         return new OnOffType[] { /* 33.14 */OnOffType.ON, /* 66.28 */ OnOffType.ON, OnOffType.ON, OnOffType.OFF, };
44     }
45
46     @Override
47     protected DecimalType[] expectedNumberItem() {
48         return new DecimalType[] { DecimalType.valueOf("33.14"), DecimalType.valueOf("66.28"),
49                 /* on */DecimalType.valueOf("1"), /* off */DecimalType.valueOf("0") };
50     }
51 }