File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/test/java/com/fasterxml/jackson/databind/ser Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ public void testEnumMapSerDisableToString() throws Exception {
412
412
m .put (LC749Enum .A , "value" );
413
413
assertEquals ("{\" A\" :\" value\" }" , w .writeValueAsString (m ));
414
414
}
415
-
415
+
416
416
public void testEnumMapSerEnableToString () throws Exception {
417
417
final ObjectMapper mapper = new ObjectMapper ();
418
418
ObjectWriter w = mapper .writer ().with (SerializationFeature .WRITE_ENUMS_USING_TO_STRING );
@@ -426,6 +426,13 @@ public void testEnumsWithJsonProperty() throws Exception {
426
426
assertEquals (quote ("aleph" ), MAPPER .writeValueAsString (EnumWithJsonProperty .A ));
427
427
}
428
428
429
+ // [databind#1535]
430
+ public void testEnumKeysWithJsonProperty () throws Exception {
431
+ Map <EnumWithJsonProperty ,Integer > input = new HashMap <EnumWithJsonProperty ,Integer >();
432
+ input .put (EnumWithJsonProperty .A , 13 );
433
+ assertEquals (aposToQuotes ("{'aleph':13}" ), MAPPER .writeValueAsString (input ));
434
+ }
435
+
429
436
// [databind#1322]
430
437
public void testEnumsWithJsonPropertyInSet () throws Exception
431
438
{
You can’t perform that action at this time.
0 commit comments