You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Henryk Konsek (JIRA)" <ji...@apache.org> on 2012/06/06 08:32:22 UTC
[jira] [Created] (CAMEL-5336) Improve Stream Component test
coverage
Henryk Konsek created CAMEL-5336:
------------------------------------
Summary: Improve Stream Component test coverage
Key: CAMEL-5336
URL: https://issues.apache.org/jira/browse/CAMEL-5336
Project: Camel
Issue Type: Improvement
Components: camel-stream
Affects Versions: 2.9.2
Reporter: Henryk Konsek
Fix For: 2.10.0
Hi,
I've improved the test coverage of Camel Stream component.
In particular I've added:
a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
Could somebody take a look at patch and possibly apply it to the trunk?
[1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-5336) Improve Stream Component test
coverage
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-5336.
--------------------------------
Resolution: Fixed
> Improve Stream Component test coverage
> --------------------------------------
>
> Key: CAMEL-5336
> URL: https://issues.apache.org/jira/browse/CAMEL-5336
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.9.2
> Reporter: Henryk Konsek
> Assignee: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: stream-component-tests.patch
>
>
> Hi,
> I've improved the test coverage of Camel Stream component.
> In particular I've added:
> a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
> b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
> Could somebody take a look at patch and possibly apply it to the trunk?
> [1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-5336) Improve Stream Component test
coverage
Posted by "Henryk Konsek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henryk Konsek resolved CAMEL-5336.
----------------------------------
Resolution: Fixed
Ok, documentation updated.
> Improve Stream Component test coverage
> --------------------------------------
>
> Key: CAMEL-5336
> URL: https://issues.apache.org/jira/browse/CAMEL-5336
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.9.2
> Reporter: Henryk Konsek
> Assignee: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: stream-component-tests.patch
>
>
> Hi,
> I've improved the test coverage of Camel Stream component.
> In particular I've added:
> a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
> b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
> Could somebody take a look at patch and possibly apply it to the trunk?
> [1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAMEL-5336) Improve Stream Component test
coverage
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-5336:
----------------------------------
Assignee: Henryk Konsek
Henryk I upgraded your JIRA account so you can self assign tickets.
> Improve Stream Component test coverage
> --------------------------------------
>
> Key: CAMEL-5336
> URL: https://issues.apache.org/jira/browse/CAMEL-5336
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.9.2
> Reporter: Henryk Konsek
> Assignee: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: stream-component-tests.patch
>
>
> Hi,
> I've improved the test coverage of Camel Stream component.
> In particular I've added:
> a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
> b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
> Could somebody take a look at patch and possibly apply it to the trunk?
> [1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (CAMEL-5336) Improve Stream Component test
coverage
Posted by "Henryk Konsek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henryk Konsek reopened CAMEL-5336:
----------------------------------
I'm reopening this since I need to update the Stream component documentation. Now usage example in documentation is generated from JUnit snippet - after my modification the snippet will be boilerplated. I'll create neat and clean dedicated code example.
> Improve Stream Component test coverage
> --------------------------------------
>
> Key: CAMEL-5336
> URL: https://issues.apache.org/jira/browse/CAMEL-5336
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.9.2
> Reporter: Henryk Konsek
> Assignee: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: stream-component-tests.patch
>
>
> Hi,
> I've improved the test coverage of Camel Stream component.
> In particular I've added:
> a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
> b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
> Could somebody take a look at patch and possibly apply it to the trunk?
> [1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-5336) Improve Stream Component test
coverage
Posted by "Henryk Konsek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henryk Konsek updated CAMEL-5336:
---------------------------------
Attachment: stream-component-tests.patch
> Improve Stream Component test coverage
> --------------------------------------
>
> Key: CAMEL-5336
> URL: https://issues.apache.org/jira/browse/CAMEL-5336
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.9.2
> Reporter: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: stream-component-tests.patch
>
>
> Hi,
> I've improved the test coverage of Camel Stream component.
> In particular I've added:
> a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
> b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
> Could somebody take a look at patch and possibly apply it to the trunk?
> [1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5336) Improve Stream Component test
coverage
Posted by "Henryk Konsek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289985#comment-13289985 ]
Henryk Konsek commented on CAMEL-5336:
--------------------------------------
I see that we generate a fragment of documentation based on the tests I've changed:
==========================
@Test
public void testStringContent() throws Exception {
template.sendBody("direct:in", "Hello Text World\n");
}
@Test
public void testBinaryContent() {
template.sendBody("direct:in", "Hello Bytes World\n".getBytes());
}
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
from("direct:in").to("stream:out");
}
};
}
==========================
I suggest to replace this snippet with dedicated custom code example (without @Test annotations). I can do it if you accept my patch.
> Improve Stream Component test coverage
> --------------------------------------
>
> Key: CAMEL-5336
> URL: https://issues.apache.org/jira/browse/CAMEL-5336
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.9.2
> Reporter: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: stream-component-tests.patch
>
>
> Hi,
> I've improved the test coverage of Camel Stream component.
> In particular I've added:
> a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
> b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
> Could somebody take a look at patch and possibly apply it to the trunk?
> [1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5336) Improve Stream Component test
coverage
Posted by "Henryk Konsek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13290054#comment-13290054 ]
Henryk Konsek commented on CAMEL-5336:
--------------------------------------
Thanks Claus :) .
> Improve Stream Component test coverage
> --------------------------------------
>
> Key: CAMEL-5336
> URL: https://issues.apache.org/jira/browse/CAMEL-5336
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.9.2
> Reporter: Henryk Konsek
> Assignee: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: stream-component-tests.patch
>
>
> Hi,
> I've improved the test coverage of Camel Stream component.
> In particular I've added:
> a) tests for Stream producer writing to the URL output stream (StreamToUrlTest).
> b) assertions to StreamSystemOutTest. Previously we've been sending a messages to the System.out but made no assertions about it. This looked like the AssertionFreeTesting [1]. :) I changed the test to temporarily switch System.out with another PrintStream instance so we could make some assertions on it.
> Could somebody take a look at patch and possibly apply it to the trunk?
> [1] http://martinfowler.com/bliki/AssertionFreeTesting.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira