This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 0b26f5a779d4e94c3f6bffa7b7384078edcd7008
Author: bossenti <[email protected]>
AuthorDate: Mon Nov 6 15:46:41 2023 +0100

    refactor(#2128): remove tests as well
---
 .../connect/adapters/PullAdapterTest.java          |  53 -------
 .../generic/elements/AddTimestampTest.java         |  41 -----
 .../generic/elements/DuplicateFilterTest.java      | 130 ----------------
 .../generic/protocol/stream/HttpProtocolTest.java  | 172 ---------------------
 .../adapters/sensemap/OpenSenseMapAdapterTest.java | 134 ----------------
 .../connect/adapters/sensemap/SensorNamesTest.java |  56 -------
 .../connect/adapters/ti/TISensorTagTest.java       |  58 -------
 7 files changed, 644 deletions(-)

diff --git 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/PullAdapterTest.java
 
b/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/PullAdapterTest.java
deleted file mode 100644
index dba72aa85..000000000
--- 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/PullAdapterTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapters;
-
-//public class PullAdapterTest {
-//    private int port = 4082;
-//
-//    @Rule
-//    public WireMockRule wireMockRule = new WireMockRule(port);
-//
-//
-//    @Test
-//    public void getDataFromEndpointStringSuccess() throws AdapterException {
-//        String expected = "EXPECTED_STRING";
-//
-//        stubFor(get(urlEqualTo("/"))
-//                .willReturn(aResponse()
-//                        .withStatus(HttpStatus.SC_OK)
-//                        .withBody(expected)));
-//
-//        String result = 
PullRestAdapter.getDataFromEndpointString("http://localhost:"; + port + "/");
-//
-//        assertEquals(expected, result);
-//
-//    }
-//
-//    @Test(expected = AdapterException.class)
-//    public void getDataFromEndpointStringFail() throws AdapterException {
-//        stubFor(get(urlEqualTo("/"))
-//                .willReturn(aResponse()
-//                        .withStatus(HttpStatus.SC_NOT_FOUND)
-//                        .withBody("")));
-//
-//        PullRestAdapter.getDataFromEndpointString("http://localhost:"; + port 
+ "/");
-//
-//    }
-//}
\ No newline at end of file
diff --git 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/elements/AddTimestampTest.java
 
b/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/elements/AddTimestampTest.java
deleted file mode 100644
index 0791808c6..000000000
--- 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/elements/AddTimestampTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapters.generic.elements;
-
-import 
org.apache.streampipes.connect.shared.preprocessing.transform.value.AddTimestampTransformationRule;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class AddTimestampTest {
-
-  @Test
-  public void addTimestamp() {
-
-    var addTimestamp = new AddTimestampTransformationRule("timestamp");
-    Map event = new HashMap<>();
-    event = addTimestamp.apply(event);
-
-    Assert.assertNotNull(event.get("timestamp"));
-  }
-
-}
diff --git 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/elements/DuplicateFilterTest.java
 
b/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/elements/DuplicateFilterTest.java
deleted file mode 100644
index 691c38e62..000000000
--- 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/elements/DuplicateFilterTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapters.generic.elements;
-
-import 
org.apache.streampipes.connect.shared.preprocessing.transform.stream.DuplicateFilterPipelineElement;
-
-import org.junit.Test;
-
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-public class DuplicateFilterTest {
-
-  @Test
-  public void duplicateSimple() {
-    DuplicateFilterPipelineElement duplicateFilter = new 
DuplicateFilterPipelineElement("0");
-    List<Map<String, Object>> events = generateEvents();
-
-    assertNotNull(duplicateFilter.apply(events.get(0)));
-    assertNull(duplicateFilter.apply(events.get(0)));
-
-  }
-
-  @Test
-  public void duplicateComplex() {
-    DuplicateFilterPipelineElement duplicateFilter = new 
DuplicateFilterPipelineElement("0");
-    List<Map<String, Object>> events = generateEvents();
-
-    assertNotNull(duplicateFilter.apply(events.get(0)));
-    assertNotNull(duplicateFilter.apply(events.get(1)));
-    assertNotNull(duplicateFilter.apply(events.get(2)));
-    assertNotNull(duplicateFilter.apply(events.get(3)));
-    assertNotNull(duplicateFilter.apply(events.get(4)));
-    assertNotNull(duplicateFilter.apply(events.get(5)));
-    assertNotNull(duplicateFilter.apply(events.get(6)));
-    assertNotNull(duplicateFilter.apply(events.get(7)));
-    assertNull(duplicateFilter.apply(events.get(0)));
-
-  }
-
-
-    /* TODO: To stir up the test, adjust the static parameters in the class
-            CLEAN_UP_INTERVAL_MILLI_SEC = 1000 * 5; //5 Sec
-            LIFE_TIME_EVENT_DUPLICATE = 1000 * 1; //1 Sec
-     */
-  /*  @Test
-    public void CleanUp1() throws InterruptedException {
-        DuplicateFilter duplicateFilter = new DuplicateFilter();
-        List<Map> events = generateEvents();
-
-        assertNotNull(duplicateFilter.process(events.get(0)));
-        assertNull(duplicateFilter.process(events.get(0)));
-        Thread.sleep(7000);
-        assertNotNull(duplicateFilter.process(events.get(0)));
-
-
-    }
-*/
-    /* TODO: To stir up the test, adjust the static parameters in the class
-         CLEAN_UP_INTERVAL_MILLI_SEC = 1000 * 5; //5 Sec
-         LIFE_TIME_EVENT_DUPLICATE = 1000 * 1; //1 Sec
-    */
-  /*  @Test
-    public void CleanUp2() throws InterruptedException {
-        DuplicateFilter duplicateFilter = new DuplicateFilter();
-        List<Map> events = generateEvents();
-
-        assertNotNull(duplicateFilter.process(events.get(0)));
-        assertNull(duplicateFilter.process(events.get(0)));
-        assertNotNull(duplicateFilter.process(events.get(1)));
-        assertNotNull(duplicateFilter.process(events.get(4)));
-        assertNotNull(duplicateFilter.process(events.get(5)));
-        Thread.sleep(7000);
-        assertNotNull(duplicateFilter.process(events.get(0)));
-        assertNotNull(duplicateFilter.process(events.get(4)));
-        assertNotNull(duplicateFilter.process(events.get(5)));
-        assertNull(duplicateFilter.process(events.get(5)));
-        assertNull(duplicateFilter.process(events.get(0)));
-        Thread.sleep(7000);
-        assertNotNull(duplicateFilter.process(events.get(0)));
-        assertNotNull(duplicateFilter.process(events.get(4)));
-        assertNotNull(duplicateFilter.process(events.get(5)));
-
-    }
-*/
-
-
-  private List<Map<String, Object>> generateEvents() {
-    List<Map<String, Object>> list = new LinkedList<>();
-
-    list.add(makeMap("Test", 123));
-    list.add(makeMap("Test", 1234));
-    list.add(makeMap("Test", "Test"));
-    list.add(makeMap("Name", "Piet"));
-    list.add(makeMap("Test", "Test12"));
-    list.add(makeMap("Age", "Smith"));
-    list.add(makeMap("Street", "Heidenstreet"));
-    list.add(makeMap("Country", "DE"));
-    list.add(makeMap("City", "Blank City"));
-
-    return list;
-  }
-
-  private Map<String, Object> makeMap(String key, Object value) {
-    Map<String, Object> map = new LinkedHashMap<>();
-    map.put(key, value);
-    return map;
-  }
-}
diff --git 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/protocol/stream/HttpProtocolTest.java
 
b/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/protocol/stream/HttpProtocolTest.java
deleted file mode 100644
index 8ec18728e..000000000
--- 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/generic/protocol/stream/HttpProtocolTest.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapters.generic.protocol.stream;
-
-//public class HttpProtocolTest {
-//
-//    @Rule
-//    public WireMockRule wireMockRule = new WireMockRule(Mock.PORT);
-//
-//    @Test
-//    public void testRunable() throws InterruptedException {
-//
-//        String expected = "Expected response";
-//
-//        stubFor(get(urlEqualTo("/"))
-//                .willReturn(aResponse()
-//                        .withStatus(HttpStatus.SC_OK)
-//                        .withBody(expected)));
-//
-//
-//        HttpStreamProtocol httpProtocol =
-//                new HttpStreamProtocol(
-//                        new TestParserWithAssertCheck(""),
-//                        new HttpProtocolTest.TestFormat(),
-//                        Mock.HOST + "/", 1, "");
-//
-//        httpProtocol.run(null);
-//        Thread.sleep(5000L);
-//        httpProtocol.stop();
-//    }
-//
-//
-//    @Test
-//    public void getDataFromEndpointTest() {
-//
-//        String expected = "Expected String";
-//
-//        stubFor(get(urlEqualTo("/"))
-//                .willReturn(aResponse()
-//                        .withStatus(200)
-//                        .withBody(expected)));
-//
-//
-//        HttpStreamProtocol httpProtocol = new HttpStreamProtocol(null, null, 
Mock.HOST + "/", 100, "");
-//
-//        InputStream data = httpProtocol.getDataFromEndpoint();
-//
-//        String resultJson = "";
-//
-//        try {
-//            resultJson = IOUtils.toString(data, "UTF-8");
-//        } catch (IOException e) {
-//            e.printStackTrace();
-//        }
-//
-//        assertEquals(expected, resultJson);
-//    }
-//
-//    @Test
-//    public void getNElementsTest() throws AdapterException {
-//
-//        stubFor(get(urlEqualTo("/"))
-//                .willReturn(aResponse()
-//                        .withStatus(HttpStatus.SC_OK)
-//                        .withBody("Example response")));
-//
-//
-//        HttpStreamProtocol httpProtocol =
-//                new HttpStreamProtocol(
-//                        new HttpProtocolTest.TestParser(""),
-//                        new HttpProtocolTest.TestFormat(),
-//                        Mock.HOST + "/", 1, "");
-//
-//        List<Map<String, Object>> result = httpProtocol.getNElements(1);
-//
-//        assertEquals(1, result.size());
-//        assertEquals("value", result.get(0).get("key"));
-//    }
-//
-//    private class TestParserWithAssertCheck extends Parser {
-//
-//        private byte[] data;
-//        public TestParserWithAssertCheck(String data) {
-//            this.data = data.getBytes();
-//        }
-//
-//        @Override
-//        public Parser getInstance(FormatDescription formatDescription) {
-//            return null;
-//        }
-//
-//        @Override
-//        public void parse(InputStream data, EmitBinaryEvent emitBinaryEvent) 
{
-//            try {
-//                String result = IOUtils.toString(data, "UTF-8");
-//                assertEquals ("Expected response", result);
-//                System.out.println("");
-//            } catch (IOException e) {
-//                e.printStackTrace();
-//            }
-//        }
-//
-//        @Override
-//        public EventSchema getEventSchema(List<byte[]> oneEvent) {
-//            return null;
-//        }
-//    }
-//
-//    private class TestParser extends Parser {
-//        private byte[] data;
-//        public TestParser(String data) {
-//            this.data = data.getBytes();
-//        }
-//
-//        @Override
-//        public Parser getInstance(FormatDescription formatDescription) {
-//            return null;
-//        }
-//
-//        @Override
-//        public void parse(InputStream data, EmitBinaryEvent emitBinaryEvent) 
{
-//            emitBinaryEvent.emit(this.data);
-//        }
-//
-//        @Override
-//        public EventSchema getEventSchema(List<byte[]> oneEvent) {
-//            return null;
-//        }
-//    }
-//
-//    private class TestFormat extends Format {
-//
-//        @Override
-//        public Format getInstance(FormatDescription formatDescription) {
-//            return null;
-//        }
-//
-//        @Override
-//        public FormatDescription declareModel() {
-//            return null;
-//        }
-//
-//        @Override
-//        public String getId() {
-//            return null;
-//        }
-//
-//        @Override
-//        public Map<String, Object> parse(byte[] object) {
-//            Map<String, Object> result = new HashMap<>();
-//            result.put("key", "value");
-//            return result;
-//        }
-//    }
-//
-//}
diff --git 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/sensemap/OpenSenseMapAdapterTest.java
 
b/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/sensemap/OpenSenseMapAdapterTest.java
deleted file mode 100644
index f2d3c02e5..000000000
--- 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/sensemap/OpenSenseMapAdapterTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapters.sensemap;
-
-//public class OpenSenseMapAdapterTest {
-//
-//  private int senseMapMockPort = 4082;
-//
-//  @Rule
-//  public WireMockRule wireMockRule = new WireMockRule(senseMapMockPort);
-//
-//  @Test
-//  public void pullData() {
-//
-//    stubFor(get(urlEqualTo("/"))
-//            .willReturn(aResponse()
-//                    .withStatus(200)
-//                    .withBody(getExampleStringEvent())));
-//
-//    OpenSenseMapAdapter adapter = new OpenSenseMapAdapter();
-//    adapter.setUrl("http://localhost:"; + senseMapMockPort);
-//    adapter.setSelectedSensors(Arrays.asList(SensorNames.KEY_TEMPERATURE,
-//    SensorNames.KEY_HUMIDITY, SensorNames.KEY_PRESSURE));
-//
-//    List<Map<String, Object>> result = adapter.getEvents();
-//
-//    assertNotNull(result);
-//    assertEquals(1, result.size());
-//
-//    Map<String, Object> event = result.get(0);
-//
-//    assertEquals(event.keySet().size(), 9);
-//
-//    assertEquals(4.1, event.get(SensorNames.KEY_TEMPERATURE));
-//    assertEquals(1536022861000L, event.get(SensorNames.KEY_TIMESTAMP));
-//    assertEquals("CALIMERO", event.get(SensorNames.KEY_NAME));
-//    assertEquals(98.0, event.get(SensorNames.KEY_HUMIDITY));
-//    assertEquals("custom", event.get(SensorNames.KEY_MODEL));
-//    assertEquals(100204.0, event.get(SensorNames.KEY_PRESSURE));
-//    assertEquals("5386026e5f08822009b8b60d", event.get(SensorNames.KEY_ID));
-//    assertEquals(10.59951787814498, event.get(SensorNames.KEY_LONGITUDE));
-//    assertEquals(49.57165903690524, event.get(SensorNames.KEY_LATITUDE));
-//
-////        assertEquals("", event.get(SensorNames.KEY_TIMESTAMP));
-//
-//    // Mock get data from endpoint
-//  }
-//
-//  private String getExampleStringEvent() {
-//    return "[{\n"
-//            + "\"_id\": \"5386026e5f08822009b8b60d\",\n"
-//            + "\"name\": \"CALIMERO\",\n"
-//            + "\"updatedAt\": \"2018-09-04T01:01:01.000Z\","
-//            + "\"sensors\": [\n"
-//            + "{\n"
-//            + "\"__v\": 0,\n"
-//            + "\"_id\": \"5386026e5f08822009b8b610\",\n"
-//            + "\"boxes_id\": \"5386026e5f08822009b8b60d\",\n"
-//            + "\"lastMeasurement\": {\n"
-//            + "\"createdAt\": \"2015-02-23T22:38:53.854Z\",\n"
-//            + "\"value\": \"100204\"\n"
-//            + "},\n"
-//            + "\"sensorType\": \"BMP085\",\n"
-//            + "\"title\": \"Luftdruck\",\n"
-//            + "\"unit\": \"Pa\"\n"
-//            + "},\n"
-//            + "{\n"
-//            + "\"__v\": 0,\n"
-//            + "\"_id\": \"5386026e5f08822009b8b611\",\n"
-//            + "\"boxes_id\": \"5386026e5f08822009b8b60d\",\n"
-//            + "\"lastMeasurement\": {\n"
-//            + "\"createdAt\": \"2015-02-23T22:35:53.904Z\",\n"
-//            + "\"value\": \"98\"\n"
-//            + "},\n"
-//            + "\"sensorType\": \"DHT11\",\n"
-//            + "\"title\": \"rel. Luftfeuchte\",\n"
-//            + "\"unit\": \"%\"\n"
-//            + "},\n"
-//            + "{\n"
-//            + "\"__v\": 0,\n"
-//            + "\"_id\": \"5386026e5f08822009b8b612\",\n"
-//            + "\"boxes_id\": \"5386026e5f08822009b8b60d\",\n"
-//            + "\"lastMeasurement\": {\n"
-//            + "\"createdAt\": \"2015-02-23T22:36:18.843Z\",\n"
-//            + "\"value\": \"4.1\"\n"
-//            + "},\n"
-//            + "\"sensorType\": \"BMP085\",\n"
-//            + "\"title\": \"Temperatur\",\n"
-//            + "\"unit\": \"°C\"\n"
-//            + "}\n"
-//            + "],\n"
-//            + "\"exposure\": \"unknown\",\n"
-//            + "\"createdAt\": \"2014-05-28T15:36:14.000Z\",\n"
-//            + "\"model\": \"custom\",\n"
-//            + "\"currentLocation\": {\n"
-//            + "\"coordinates\": [\n"
-//            + "10.59951787814498,\n"
-//            + "49.57165903690524\n"
-//            + "],\n"
-//            + "\"type\": \"Point\",\n"
-//            + "\"timestamp\": \"2014-05-28T15:36:14.000Z\"\n"
-//            + "},\n"
-//            + "\"loc\": [\n"
-//            + "{\n"
-//            + "\"geometry\": {\n"
-//            + "\"coordinates\": [\n"
-//            + "10.59951787814498,\n"
-//            + "49.57165903690524\n"
-//            + "],\n"
-//            + "\"type\": \"Point\",\n"
-//            + "\"timestamp\": \"2014-05-28T15:36:14.000Z\"\n"
-//            + "},\n"
-//            + "\"type\": \"Feature\"\n"
-//            + "}\n"
-//            + "]\n"
-//            + "}]";
-//  }
-//}
\ No newline at end of file
diff --git 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/sensemap/SensorNamesTest.java
 
b/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/sensemap/SensorNamesTest.java
deleted file mode 100644
index 486e5ac11..000000000
--- 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/sensemap/SensorNamesTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapters.sensemap;
-
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-
-public class SensorNamesTest {
-
-  @Test
-  public void getKeyTest() {
-
-    assertEquals(SensorNames.KEY_HUMIDITY, 
SensorNames.getKey(SensorNames.GERMAN_HUMIDITY));
-    assertEquals(SensorNames.KEY_TEMPERATURE, 
SensorNames.getKey(SensorNames.GERMAN_TEMPERATURE));
-    assertEquals(SensorNames.KEY_PRESSURE, 
SensorNames.getKey(SensorNames.GERMAN_PRESSURE));
-    assertEquals(SensorNames.KEY_ILLUMINANCE, 
SensorNames.getKey(SensorNames.GERMAN_ILLUMINANCE));
-    assertEquals(SensorNames.KEY_UV_INTENSITY, 
SensorNames.getKey(SensorNames.GERMAN_UV_INTENSITY));
-    assertEquals(SensorNames.KEY_PM10, 
SensorNames.getKey(SensorNames.GERMAN_PM10));
-    assertEquals(SensorNames.KEY_PM2_5, 
SensorNames.getKey(SensorNames.GERMAN_PM2_5));
-    assertEquals(SensorNames.KEY_PM2_5, 
SensorNames.getKey(SensorNames.GERMAN_PM2_5 + "suffix"));
-    assertEquals(SensorNames.KEY_NOT_FOUND, SensorNames.getKey(""));
-
-  }
-
-  @Test
-  public void getKeyFromLabelTest() {
-    assertEquals(SensorNames.KEY_HUMIDITY, 
SensorNames.getKeyFromLabel(SensorNames.LABEL_HUMIDITY));
-    assertEquals(SensorNames.KEY_TEMPERATURE, 
SensorNames.getKeyFromLabel(SensorNames.LABEL_TEMPERATURE));
-    assertEquals(SensorNames.KEY_PRESSURE, 
SensorNames.getKeyFromLabel(SensorNames.LABEL_PRESSURE));
-    assertEquals(SensorNames.KEY_ILLUMINANCE, 
SensorNames.getKeyFromLabel(SensorNames.LABEL_ILLUMINANCE));
-    assertEquals(SensorNames.KEY_UV_INTENSITY, 
SensorNames.getKeyFromLabel(SensorNames.LABEL_UV_INTENSITY));
-    assertEquals(SensorNames.KEY_PM10, 
SensorNames.getKeyFromLabel(SensorNames.LABEL_PM10));
-    assertEquals(SensorNames.KEY_PM2_5, 
SensorNames.getKeyFromLabel(SensorNames.LABEL_PM2_5));
-    assertEquals(SensorNames.KEY_NOT_FOUND, SensorNames.getKeyFromLabel(""));
-
-  }
-
-
-}
\ No newline at end of file
diff --git 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/ti/TISensorTagTest.java
 
b/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/ti/TISensorTagTest.java
deleted file mode 100644
index 7f8e82154..000000000
--- 
a/streampipes-extensions/streampipes-connect-adapters/src/test/java/org/apache/streampipes/connect/adapters/ti/TISensorTagTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.connect.adapters.ti;
-
-public class TISensorTagTest {
-//  String event = "{\n"
-//      + "\"ambientTemp\":\"19.58\",\n"
-//      + "\"objectTemp\":\"16.59\",\n"
-//      + "\"humidity\":\"38.3917\",\n"
-//      + "\"accelX\":\"0.28\",\n"
-//      + "\"accelY\":\"-0.48\",\n"
-//      + "\"accelZ\":\"-0.91\",\n"
-//      + "\"gyroX\":\"4.88\",\n"
-//      + "\"gyroY\":\"4.53\",\n"
-//      + "\"gyroZ\":\"-2.96\",\n"
-//      + "\"magX\":\"134.16\",\n"
-//      + "\"magY\":\"-17.84\" \n"
-//      + "\"magZ\":\"18.44\" \n"
-//      + "\"light\":\"0.00\" \n"
-//      + "\n"
-//      + "}";
-//
-//  @Test
-//  public void parseEvent() {
-//    Map<String, Object> result = TISensorTag.parseEvent(event);
-//
-//    assertEquals(16, result.keySet().size());
-//    assertEquals(result.get("ambientTemp"), 19.58);
-//    assertEquals(result.get("objectTemp"), 16.59);
-//    assertEquals(result.get("humidity"), 38.3917);
-//    assertEquals(result.get("accelX"), 0.28);
-//    assertEquals(result.get("accelY"), -0.48);
-//    assertEquals(result.get("accelZ"), -0.91);
-//    assertEquals(result.get("gyroX"), 4.88);
-//    assertEquals(result.get("gyroY"), 4.53);
-//    assertEquals(result.get("gyroZ"), -2.96);
-//    assertEquals(result.get("magX"), 134.16);
-//    assertEquals(result.get("magY"), -17.84);
-//    assertEquals(result.get("magZ"), 18.44);
-//    assertEquals(result.get("light"), 0.00);
-//  }
-}
\ No newline at end of file

Reply via email to