|
static ObjectMapper | mapper = new ObjectMapper() |
|
static JsonNode | baseNode |
|
◆ getJsonNode()
JsonNode org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.getJsonNode |
( |
| ) |
throws IOException |
|
inlineprivate |
42 baseNode =
mapper.readTree(
"{ \"value1\" : \"v1 \",\"value_null\" : null,\"value_empty\" : \"\", \"value_b\" : true, \"value_i\" : 454, " +
" \"value_array\":[\"a1\",\"a2\"], " +
" \"nest1\": {\"value1\": \" fgh \",\"value_null\" : null,\"value_empty\" : \"\", \"nest2\":{\"value_b\" : false, \"value_i\" : 43}}, "+
" \"nesta\": { \"a\":[{\"av1\": \"vala1\"},{\"av1\": \"vala2\"}]}"+
" }");
static ObjectMapper mapper
Definition: AbstractJsonUserAttributeMapperTest.java:36
static JsonNode baseNode
Definition: AbstractJsonUserAttributeMapperTest.java:38
◆ getJsonValue_invalidPath()
void org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.getJsonValue_invalidPath |
( |
| ) |
throws IOException |
|
inline |
48 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"."));
49 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
".."));
50 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"...value1"));
51 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
".value1"));
52 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value1."));
53 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"[]"));
54 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"[value1"));
JsonNode getJsonNode()
Definition: AbstractJsonUserAttributeMapperTest.java:40
◆ getJsonValue_nestedArrayWithObjects()
void org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.getJsonValue_nestedArrayWithObjects |
( |
| ) |
throws JsonProcessingException, IOException |
|
inline |
121 Assert.assertEquals(
"vala1", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a[0].av1"));
122 Assert.assertEquals(
"vala2", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a[1].av1"));
125 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a[2].av1"));
126 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a[0]"));
127 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a[0].av_unknown"));
128 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a[].av1"));
129 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a"));
130 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a.av1"));
131 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a].av1"));
132 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nesta.a[.av1"));
JsonNode getJsonNode()
Definition: AbstractJsonUserAttributeMapperTest.java:40
◆ getJsonValue_nestedSimpleValues()
void org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.getJsonValue_nestedSimpleValues |
( |
| ) |
throws JsonProcessingException, IOException |
|
inline |
78 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1"));
79 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.nest2"));
82 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.value_unknown"));
83 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.nest2.value_unknown"));
86 Assert.assertEquals(
"fgh", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.value1"));
88 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.value_null"));
89 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.value_empty"));
91 Assert.assertEquals(
"false", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.nest2.value_b"));
92 Assert.assertEquals(
"43", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.nest2.value_i"));
95 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1."));
96 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"nest1.nest2."));
JsonNode getJsonNode()
Definition: AbstractJsonUserAttributeMapperTest.java:40
◆ getJsonValue_simpleArray()
void org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.getJsonValue_simpleArray |
( |
| ) |
throws JsonProcessingException, IOException |
|
inline |
103 Assert.assertEquals(Arrays.asList(
"a1",
"a2"), AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array"));
105 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array[2]"));
108 Assert.assertEquals(
"a1", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array[0]"));
109 Assert.assertEquals(
"a2", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array[1]"));
112 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array[]"));
113 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array]"));
114 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array["));
115 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array[a]"));
116 Assert.assertNull(AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_array[-2]"));
JsonNode getJsonNode()
Definition: AbstractJsonUserAttributeMapperTest.java:40
◆ getJsonValue_simpleValues()
void org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.getJsonValue_simpleValues |
( |
| ) |
throws JsonProcessingException, IOException |
|
inline |
61 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_unknown"));
64 Assert.assertEquals(
"v1", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value1"));
66 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_null"));
67 Assert.assertEquals(null, AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_empty"));
69 Assert.assertEquals(
"true", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_b"));
70 Assert.assertEquals(
"454", AbstractJsonUserAttributeMapper.getJsonValue(
getJsonNode(),
"value_i"));
JsonNode getJsonNode()
Definition: AbstractJsonUserAttributeMapperTest.java:40
◆ baseNode
JsonNode org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.baseNode |
|
staticprivate |
◆ mapper
ObjectMapper org.keycloak.test.broker.oidc.mappers.AbstractJsonUserAttributeMapperTest.mapper = new ObjectMapper() |
|
staticprivate |
このクラス詳解は次のファイルから抽出されました: