Skip to content

Commit

Permalink
moved-contents-of-setup
Browse files Browse the repository at this point in the history
Signed-off-by: shinigami-777 <[email protected]>
  • Loading branch information
shinigami-777 committed Dec 23, 2024
1 parent 6b9b4fb commit 75eade3
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nl.jqno.equalsverifier.EqualsVerifier;
import nl.jqno.equalsverifier.Warning;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
Expand All @@ -20,16 +19,10 @@ public class NextLabelCauseTest {
*
* @throws Exception
*/
private FreeStyleBuild build;

@Before
public void setup() throws Exception {
FreeStyleProject project = j.createFreeStyleProject("projectB");
build = j.buildAndAssertSuccess(project);
}

@Test
public void testGetShortDescription() {
public void testGetShortDescription() throws Exception {
FreeStyleProject project = j.createFreeStyleProject("projectB");
FreeStyleBuild build = j.buildAndAssertSuccess(project);
NextLabelCause cause = new NextLabelCause("dummylabel", build);
String description = cause.getShortDescription();
Assert.assertEquals(description, "A build with label/node [dummylabel] was requested");
Expand Down

0 comments on commit 75eade3

Please sign in to comment.