mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-13 23:06:54 +10:00
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-commons/trunk@803 84d0f5b1-2673-498c-a247-62c4ff18d310
39 lines
1022 B
Java
39 lines
1022 B
Java
package com.profiler.common.bo;
|
|
|
|
import org.junit.Assert;
|
|
import org.junit.Test;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public class AnnotationBoTest {
|
|
@Test
|
|
public void testGetVersion() throws Exception {
|
|
|
|
}
|
|
|
|
@Test
|
|
public void testSetVersion() throws Exception {
|
|
|
|
}
|
|
|
|
@Test
|
|
public void testWriteValue() throws Exception {
|
|
AnnotationBo bo = new AnnotationBo();
|
|
bo.setKey("test");
|
|
bo.setValue("value".getBytes("UTF-8"));
|
|
int bufferSize = bo.getBufferSize();
|
|
byte[] bytes = new byte[bufferSize];
|
|
bo.writeValue(bytes, 0);
|
|
|
|
AnnotationBo bo2 = new AnnotationBo();
|
|
bo2.readValue(bytes, 0);
|
|
Assert.assertEquals(bo.getKey(), bo2.getKey());
|
|
Assert.assertEquals(bo.getDuration(), bo2.getDuration());
|
|
Assert.assertEquals(bo.getTimestamp(), bo2.getTimestamp());
|
|
Assert.assertEquals(bo.getValueType(), bo2.getValueType());
|
|
Assert.assertArrayEquals(bo.getValue(), bo2.getValue());
|
|
}
|
|
|
|
}
|