Permalink
Browse files

make purpose of lone test clearer

  • Loading branch information...
1 parent 4f0efc4 commit ee4c7cacef457118aa1866711b562305da72f27c @peterlynch peterlynch committed Apr 30, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/test/java/jenkins/plugins/hipchat/StandardHipChatServiceTest.java
@@ -1,19 +1,18 @@
package jenkins.plugins.hipchat;
+import jenkins.plugins.hipchat.StandardHipChatService;
import org.junit.Before;
import org.junit.Test;
public class StandardHipChatServiceTest {
- private StandardHipChatService service;
-
- @Before
- public void setUp() throws Exception {
- service = new StandardHipChatService("token", "room", "from");
- service.setHost("localhost");
- }
+ /**
+ * Publish should generally not rethrow exceptions, or it will cause a build job to fail at end.
+ */
@Test
- public void publishShouldNotRethrowExceptions() {
+ public void publishWithBadHostShouldNotRethrowExceptions() {
+ StandardHipChatService service = new StandardHipChatService("token", "room", "from");
+ service.setHost("hostvaluethatwillcausepublishtofail");
service.publish("message");
}
}

0 comments on commit ee4c7ca

Please sign in to comment.