Code example for FileReader

0
    DevRelayConfigGenerator.generateRelayConfig(schemaDir.getAbsolutePath(), "example", uri, schemaDir.getAbsolutePath(), exampleSrcs, mgr);
 
    File f = new File(schemaDir.getAbsolutePath() + "/sources-example.json");
    Assert.assertTrue( f.exists(),"Physical Src Config file present?");
 
    BufferedReader r = new BufferedReader(new FileReader(f));
 
    String json = r.readLine();
    PhysicalSourceConfig config = PhysicalSourceConfig.fromString(json);
    config.checkForNulls();
 
    Assert.assertEquals(config.getUri(), uri);
    Assert.assertEquals(config.getName(), "example");
 
    List<LogicalSourceConfig> srcs = config.getSources();
    Assert.assertEquals(srcs.size(),2 );
    Assert.assertEquals(srcs.get(0).getId(), 1);
    Assert.assertEquals(srcs.get(0).getName(), "com.linkedin.events.example.person");
    Assert.assertEquals(srcs.get(0).getUri(), "example.sy$person");
    Assert.assertEquals(srcs.get(1).getId(), 2);
    Assert.assertEquals(srcs.get(1).getName(), "com.linkedin.events.example.address");