Github user chinmaykolhatkar commented on a diff in the pull request:

    https://github.com/apache/apex-malhar/pull/348#discussion_r71710711
  
    --- Diff: 
library/src/test/java/com/datatorrent/lib/formatter/JsonFormatterTest.java ---
    @@ -182,14 +173,19 @@ public void testJSONToPOJONoFieldPOJO()
         Assert.assertEquals(0, validDataSink.collectedTuples.size());
         Assert.assertEquals(1, invalidDataSink.collectedTuples.size());
         Assert.assertEquals(o, invalidDataSink.collectedTuples.get(0));
    +    Assert.assertEquals(1, operator.getIncomingTuplesCount());
    +    Assert.assertEquals(0, operator.getEmittedObjectCount());
    +    Assert.assertEquals(1, operator.getErrorTupleCount());
       }
     
       public static class Test1Pojo
       {
         public int a;
         public long b;
    +    @JsonProperty("c2")
         public String c;
         public List<String> d;
    +    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd")
    --- End diff --
    
    This looks good... Can you also add few other fields and see how the values 
interact for them:
    1. java.util.Date without annotation.. What is the expected format and does 
the test pass with default format?
    2. java.util.Time... Is there any annotation for that? If yes, can you test 
out  Time field for both annotation and without annotation.... If there is no 
annotation, please add just a new Time field and see default format.
    3. Please add tests for different patterns as well.. Just a single pattern 
is not enough.. Please include other time and timezone etc fields also in 
pattern.
    4. What happens if the shape is change? What are the possible values for 
that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to