Github user shubham-pathak22 commented on a diff in the pull request:

    
https://github.com/apache/incubator-apex-malhar/pull/154#discussion_r48836388
  
    --- Diff: 
contrib/src/test/java/com/datatorrent/contrib/parser/CsvPOJOParserTest.java ---
    @@ -20,169 +20,425 @@
     
     import java.util.Date;
     
    -import org.joda.time.DateTime;
    +import org.junit.After;
     import org.junit.Assert;
    -import org.junit.Rule;
    +import org.junit.Before;
     import org.junit.Test;
    -import org.junit.rules.TestWatcher;
    -import org.junit.runner.Description;
     
    +import com.datatorrent.lib.appdata.schemas.SchemaUtils;
     import com.datatorrent.lib.testbench.CollectorTestSink;
    -import com.datatorrent.lib.util.TestUtils;
     
     public class CsvPOJOParserTest
     {
     
    -  CsvParser operator;
    -  CollectorTestSink<Object> validDataSink;
    -  CollectorTestSink<String> invalidDataSink;
    +  private static final String filename = "schema.json";
    +  CollectorTestSink<Object> error = new CollectorTestSink<Object>();
    +  CollectorTestSink<Object> objectPort = new CollectorTestSink<Object>();
    +  CollectorTestSink<Object> pojoPort = new CollectorTestSink<Object>();
    +  CsvParser parser = new CsvParser();
     
    -  @Rule
    -  public Watcher watcher = new Watcher();
    +  /*
    +  * 
adId,campaignId,adName,bidPrice,startDate,endDate,securityCode,isActive,isOptimized,parentCampaign,weatherTargeted,valid
    +  * 1234,98233,adxyz,0.2,2015-03-08 
03:37:12,11/12/2012,12,y,OPTIMIZE,CAMP_AD,Y,yes
    +  * Constraints are defined in schema.json
    +  */
     
    -  public class Watcher extends TestWatcher
    +  @Before
    +  public void setup()
    --- End diff --
    
    It can be. I used the same code that i had already written for enhanced 
parser.


---
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