Mercurial > hg > Members > kazuma > jungle-ormapper
comparison src/test/java/jp/ac/u_ryukyu/ie/cr/jungle/core/AttributesTest.java @ 0:44465893e8b8
first Commit
author | Kazuma |
---|---|
date | Wed, 30 Nov 2016 01:47:55 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:44465893e8b8 |
---|---|
1 package jp.ac.u_ryukyu.ie.cr.jungle.core; | |
2 | |
3 import jp.ac.u_ryukyu.ie.cr.jungle.util.Pair; | |
4 import jp.ac.u_ryukyu.ie.cr.jungle.data.list.List; | |
5 import junit.framework.Assert; | |
6 import junit.framework.TestCase; | |
7 import org.junit.Ignore; | |
8 | |
9 import java.nio.ByteBuffer; | |
10 | |
11 @Ignore | |
12 public abstract class AttributesTest extends TestCase { | |
13 @SuppressWarnings("unchecked") | |
14 public static List<Pair<String, ByteBuffer>> ENTRIES = new List( | |
15 new Pair("KEY1", ByteBuffer.wrap("VALUE1".getBytes())), | |
16 new Pair("KEY2", ByteBuffer.wrap("VALUE2".getBytes())), | |
17 new Pair("KEY3", ByteBuffer.wrap("VALUE3".getBytes())) | |
18 ); | |
19 | |
20 public abstract Attributes instance(); | |
21 | |
22 public void testGet() { | |
23 Attributes attrs = instance(); | |
24 | |
25 for (Pair<String, ByteBuffer> entry : ENTRIES) { | |
26 String key = entry.left(); | |
27 ByteBuffer expect = entry.right(); | |
28 ByteBuffer actual = attrs.get(key); | |
29 Assert.assertNotNull(actual); | |
30 Assert.assertEquals(0, actual.compareTo(expect)); | |
31 } | |
32 } | |
33 } |