JiraExportPluginResourceTest.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:plugin-bt-jira 作者:
@Test
public void getStatusHistory() throws Exception {
    final int subscription = getSubscription("MDA");
    final StreamingOutput csv = (StreamingOutput) resource.getStatusHistory(subscription, "file1").getEntity();
    final ByteArrayOutputStream out = new ByteArrayOutputStream();
    csv.write(out);
    final BufferedReader inputStreamReader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(out.toByteArray()), "cp1252"));
    final String header = inputStreamReader.readLine();
    Assert.assertEquals("issueid;key;author;from;to;fromText;toText;date;dateTimestamp", header);
    String lastLine = inputStreamReader.readLine();
    Assert.assertEquals("11432;MDA-1;fdaugan;;1;;OPEN;2009/03/23 15:26:43;1237818403000", lastLine);
    lastLine = inputStreamReader.readLine();
    Assert.assertEquals("11437;MDA-4;xsintive;;1;;OPEN;2009/03/23 16:23:31;1237821811000", lastLine);
    lastLine = inputStreamReader.readLine();
    lastLine = inputStreamReader.readLine();
    lastLine = inputStreamReader.readLine();
    lastLine = inputStreamReader.readLine();
    Assert.assertEquals("11535;MDA-8;challer;;1;;OPEN;2009/04/01 14:20:29;1238588429000", lastLine);
    lastLine = inputStreamReader.readLine();
    lastLine = inputStreamReader.readLine();
    lastLine = inputStreamReader.readLine();
    Assert.assertEquals("11535;MDA-8;fdaugan;1;10024;OPEN;ASSIGNED;2009/04/09 09:45:16;1239263116000", lastLine);
    lastLine = inputStreamReader.readLine();
    Assert.assertEquals("11535;MDA-8;fdaugan;10024;3;ASSIGNED;IN PROGRESS;2009/04/09 09:45:30;1239263130000", lastLine);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号