Move back to JUnit 4 until SUREFIRE-1614 has been resolved

See gh-14736
See gh-14737
See gh-14738
This commit is contained in:
Andy Wilkinson
2018-12-12 12:23:20 +00:00
parent 2b453bbb16
commit 064f6478df
806 changed files with 2221 additions and 2220 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,14 @@
package sample.activemq;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.extension.OutputCapture;
import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
@@ -32,10 +34,11 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@SpringBootTest
@RunWith(SpringRunner.class)
public class SampleActiveMqTests {
@RegisterExtension
OutputCapture output = new OutputCapture();
@ClassRule
public static final OutputCapture output = new OutputCapture();
@Autowired
private Producer producer;
@@ -44,7 +47,7 @@ public class SampleActiveMqTests {
public void sendSimpleMessage() throws InterruptedException {
this.producer.send("Test message");
Thread.sleep(1000L);
assertThat(this.output.toString().contains("Test message")).isTrue();
assertThat(output.toString().contains("Test message")).isTrue();
}
}