-
Notifications
You must be signed in to change notification settings - Fork 215
/
TestMapperTest.java
39 lines (35 loc) · 1.32 KB
/
TestMapperTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package org.eclipse.ditto.connectivity.service.mapping;
/*
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
import org.eclipse.ditto.protocol.adapter.DittoProtocolAdapter;
import org.eclipse.ditto.protocol.adapter.ProtocolAdapter;
import org.eclipse.ditto.things.model.ThingId;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class TestMapperTest {
private static final ThingId THING_ID = ThingId.of("thing:id");
private static final ProtocolAdapter ADAPTER = DittoProtocolAdapter.newInstance();
String payload = "{\"specversion\": \"1.0\", \"id\":\"3212e\", \"source\":\"http:somesite.com\",\"type\":\"com.site.com\"}";
private TestMapper underTest;
@Before
public void setUp() {
underTest = new TestMapper();
}
@Test
public void validatePayload(){
Boolean expected = true;
Boolean actual = underTest.validatePayload(payload);
assertEquals(expected,actual);
}
}