blob: 3d75f6543543cbf26296952431e9f2f0964510fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.fasterxml.jackson.databind.introspect;
import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.databind.*;
public class BeanDescriptionTest extends BaseMapTest
{
private final ObjectMapper MAPPER = objectMapper();
private final static String CLASS_DESC = "Description, yay!";
@JsonClassDescription(CLASS_DESC)
static class DocumentedBean {
public int x;
}
public void testClassDesc() throws Exception
{
BeanDescription beanDesc = MAPPER.getDeserializationConfig().introspect(MAPPER.constructType(DocumentedBean.class));
assertEquals(CLASS_DESC, beanDesc.findClassDescription());
}
}
|