update bom version, add test for BytesMarshallable key/values

This commit is contained in:
epickrram
2017-10-11 14:44:59 +01:00
parent 90e94e563d
commit 8f0dd3d875
2 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-bom</artifactId>
<version>1.14.68</version>
<version>1.14.79</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -0,0 +1,28 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.wire.AbstractMarshallable;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public final class AbstractMarshallableKeyValueTest {
@Test
public void shouldAcceptAbstractMarshallableComponents() throws Exception {
final ChronicleMap<Key, Value> map = ChronicleMapBuilder.of(Key.class, Value.class).entries(10).
averageKey(new Key()).averageValue(new Value()).create();
map.put(new Key(), new Value());
assertThat(map.get(new Key()).number, is(new Value().number));
}
private static final class Key extends AbstractMarshallable {
private String k = "key";
}
private static final class Value extends AbstractMarshallable {
private Integer number = Integer.valueOf(17);
}
}