2727import org .junit .Test ;
2828import org .msgpack .core .MessagePack ;
2929import org .msgpack .core .MessagePacker ;
30- import org .msgpack .core .buffer .OutputStreamBufferOutput ;
3130
3231import java .io .ByteArrayOutputStream ;
3332import java .io .File ;
@@ -288,7 +287,7 @@ else if (k.equals("child_map_age")) {
288287 public void testMessagePackParserDirectly ()
289288 throws IOException
290289 {
291- MessagePackFormatFactory factory = new MessagePackFormatFactory ();
290+ MessagePackFactory factory = new MessagePackFactory ();
292291 File tempFile = File .createTempFile ("msgpackTest" , "msgpack" );
293292 tempFile .deleteOnExit ();
294293
@@ -354,7 +353,7 @@ public void testMessagePackParserDirectly()
354353 public void testReadPrimitives ()
355354 throws Exception
356355 {
357- MessagePackFormatFactory factory = new MessagePackFormatFactory ();
356+ MessagePackFactory factory = new MessagePackFactory ();
358357 File tempFile = createTempFile ();
359358
360359 FileOutputStream out = new FileOutputStream (tempFile );
@@ -396,7 +395,7 @@ public void testBigDecimal()
396395 packer .packDouble (Double .MIN_NORMAL );
397396 packer .flush ();
398397
399- ObjectMapper mapper = new ObjectMapper (new MessagePackFormatFactory ());
398+ ObjectMapper mapper = new ObjectMapper (new MessagePackFactory ());
400399 mapper .configure (DeserializationFeature .USE_BIG_DECIMAL_FOR_FLOATS , true );
401400 List <Object > objects = mapper .readValue (out .toByteArray (), new TypeReference <List <Object >>() {});
402401 assertEquals (5 , objects .size ());
@@ -431,7 +430,7 @@ public void testEnableFeatureAutoCloseSource()
431430 throws Exception
432431 {
433432 File tempFile = createTestFile ();
434- MessagePackFormatFactory factory = new MessagePackFormatFactory ();
433+ MessagePackFactory factory = new MessagePackFactory ();
435434 FileInputStream in = new FileInputStream (tempFile );
436435 ObjectMapper objectMapper = new ObjectMapper (factory );
437436 objectMapper .readValue (in , new TypeReference <List <Integer >>() {});
@@ -444,7 +443,7 @@ public void testDisableFeatureAutoCloseSource()
444443 {
445444 File tempFile = createTestFile ();
446445 FileInputStream in = new FileInputStream (tempFile );
447- ObjectMapper objectMapper = new ObjectMapper (new MessagePackFormatFactory ());
446+ ObjectMapper objectMapper = new ObjectMapper (new MessagePackFactory ());
448447 objectMapper .configure (JsonParser .Feature .AUTO_CLOSE_SOURCE , false );
449448 objectMapper .readValue (in , new TypeReference <List <Integer >>() {});
450449 objectMapper .readValue (in , new TypeReference <List <Integer >>() {});
@@ -456,7 +455,7 @@ public void testParseBigDecimal()
456455 {
457456 ArrayList <BigDecimal > list = new ArrayList <BigDecimal >();
458457 list .add (new BigDecimal (Long .MAX_VALUE ));
459- ObjectMapper objectMapper = new ObjectMapper (new MessagePackFormatFactory ());
458+ ObjectMapper objectMapper = new ObjectMapper (new MessagePackFactory ());
460459 byte [] bytes = objectMapper .writeValueAsBytes (list );
461460
462461 ArrayList <BigDecimal > result = objectMapper .readValue (
@@ -481,7 +480,7 @@ public void testReadPrimitiveObjectViaObjectMapper()
481480 packer .close ();
482481
483482 FileInputStream in = new FileInputStream (tempFile );
484- ObjectMapper objectMapper = new ObjectMapper (new MessagePackFormatFactory ());
483+ ObjectMapper objectMapper = new ObjectMapper (new MessagePackFactory ());
485484 objectMapper .configure (JsonParser .Feature .AUTO_CLOSE_SOURCE , false );
486485 assertEquals ("foo" , objectMapper .readValue (in , new TypeReference <String >() {}));
487486 long l = objectMapper .readValue (in , new TypeReference <Long >() {});
@@ -511,7 +510,7 @@ public void testBinaryKey()
511510 packer .packLong (42 );
512511 packer .close ();
513512
514- ObjectMapper mapper = new ObjectMapper (new MessagePackFormatFactory ());
513+ ObjectMapper mapper = new ObjectMapper (new MessagePackFactory ());
515514 Map <String , Object > object = mapper .readValue (new FileInputStream (tempFile ), new TypeReference <Map <String , Object >>() {});
516515 assertEquals (2 , object .size ());
517516 assertEquals (3.14 , object .get ("foo" ));
@@ -533,7 +532,7 @@ public void testBinaryKeyInNestedObject()
533532 packer .packInt (1 );
534533 packer .close ();
535534
536- ObjectMapper mapper = new ObjectMapper (new MessagePackFormatFactory ());
535+ ObjectMapper mapper = new ObjectMapper (new MessagePackFactory ());
537536 List <Object > objects = mapper .readValue (out .toByteArray (), new TypeReference <List <Object >>() {});
538537 assertEquals (2 , objects .size ());
539538 @ SuppressWarnings (value = "unchecked" )
@@ -555,7 +554,7 @@ public void testByteArrayKey()
555554 messagePacker .packBinaryHeader (1 ).writePayload (k1 ).packInt (3 );
556555 messagePacker .close ();
557556
558- ObjectMapper objectMapper = new ObjectMapper (new MessagePackFormatFactory ());
557+ ObjectMapper objectMapper = new ObjectMapper (new MessagePackFactory ());
559558 SimpleModule module = new SimpleModule ();
560559 module .addKeyDeserializer (byte [].class , new KeyDeserializer ()
561560 {
@@ -592,7 +591,7 @@ public void testIntegerKey()
592591 }
593592 messagePacker .close ();
594593
595- ObjectMapper objectMapper = new ObjectMapper (new MessagePackFormatFactory ());
594+ ObjectMapper objectMapper = new ObjectMapper (new MessagePackFactory ());
596595 SimpleModule module = new SimpleModule ();
597596 module .addKeyDeserializer (Integer .class , new KeyDeserializer ()
598597 {
@@ -623,7 +622,7 @@ public void testFloatKey()
623622 }
624623 messagePacker .close ();
625624
626- ObjectMapper objectMapper = new ObjectMapper (new MessagePackFormatFactory ());
625+ ObjectMapper objectMapper = new ObjectMapper (new MessagePackFactory ());
627626 SimpleModule module = new SimpleModule ();
628627 module .addKeyDeserializer (Float .class , new KeyDeserializer ()
629628 {
@@ -653,7 +652,7 @@ public void testBooleanKey()
653652 messagePacker .packBoolean (false ).packInt (3 );
654653 messagePacker .close ();
655654
656- ObjectMapper objectMapper = new ObjectMapper (new MessagePackFormatFactory ());
655+ ObjectMapper objectMapper = new ObjectMapper (new MessagePackFactory ());
657656 SimpleModule module = new SimpleModule ();
658657 module .addKeyDeserializer (Boolean .class , new KeyDeserializer ()
659658 {
0 commit comments