Skip to content

Commit 937170c

Browse files
authored
Use org.hamcrest.MatcherAssert.assertThat instead of the deprecated org.junit.Assert.assertThat calls (flutter#6946)
1 parent 2f11f24 commit 937170c

12 files changed

+12
-11
lines changed

flutter-idea/testSrc/unit/io/flutter/editor/ActiveEditorsOutlineServiceTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import java.util.HashMap;
2424
import java.util.Map;
2525

26+
import static org.hamcrest.MatcherAssert.assertThat;
2627
import static org.hamcrest.CoreMatchers.*;
27-
import static org.junit.Assert.assertThat;
2828

2929
public class ActiveEditorsOutlineServiceTest {
3030
private static final String fileContents = "void main() {\n" +

flutter-idea/testSrc/unit/io/flutter/editor/ExpressionParsingUtilsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import org.junit.Test;
99

1010
import static org.hamcrest.CoreMatchers.*;
11-
import static org.junit.Assert.assertThat;
11+
import static org.hamcrest.MatcherAssert.assertThat;
1212

1313
public class ExpressionParsingUtilsTest {
1414
@Test

flutter-idea/testSrc/unit/io/flutter/logging/FlutterConsoleLogManagerTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import static org.hamcrest.CoreMatchers.containsString;
3434
import static org.hamcrest.CoreMatchers.not;
3535
import static org.junit.Assert.assertEquals;
36-
import static org.junit.Assert.assertThat;
36+
import static org.hamcrest.MatcherAssert.assertThat;
3737
import static org.mockito.Mockito.mock;
3838
import static org.mockito.Mockito.when;
3939

flutter-idea/testSrc/unit/io/flutter/run/bazel/BazelConfigurationFactoryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import org.junit.Test;
1212

1313
import static org.hamcrest.CoreMatchers.equalTo;
14-
import static org.junit.Assert.assertThat;
14+
import static org.hamcrest.MatcherAssert.assertThat;
1515

1616

1717
/**

flutter-idea/testSrc/unit/io/flutter/run/bazel/LaunchCommandsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import java.util.concurrent.CompletableFuture;
3131

3232
import static org.hamcrest.CoreMatchers.equalTo;
33-
import static org.junit.Assert.assertThat;
33+
import static org.hamcrest.MatcherAssert.assertThat;
3434
import static org.mockito.Mockito.mock;
3535
import static org.mockito.Mockito.when;
3636

flutter-idea/testSrc/unit/io/flutter/run/bazelTest/BazelTestConfigProducerTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
import static org.hamcrest.CoreMatchers.equalTo;
3737
import static org.hamcrest.core.IsNot.not;
38-
import static org.junit.Assert.assertThat;
38+
import static org.hamcrest.MatcherAssert.assertThat;
3939

4040
public class BazelTestConfigProducerTest extends AbstractDartElementTest {
4141

flutter-idea/testSrc/unit/io/flutter/run/bazelTest/BazelTestConfigurationFactoryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import org.junit.Test;
99

1010
import static org.hamcrest.CoreMatchers.equalTo;
11-
import static org.junit.Assert.assertThat;
11+
import static org.hamcrest.MatcherAssert.assertThat;
1212

1313
/**
1414
* Verify the behavior of bazel test configuration factories.

flutter-idea/testSrc/unit/io/flutter/run/bazelTest/LaunchCommandsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.util.List;
2727

2828
import static org.hamcrest.CoreMatchers.equalTo;
29-
import static org.junit.Assert.assertThat;
29+
import static org.hamcrest.MatcherAssert.assertThat;
3030
import static org.junit.Assert.assertTrue;
3131

3232
public class LaunchCommandsTest {

flutter-idea/testSrc/unit/io/flutter/run/common/CommonTestConfigUtilsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import static org.hamcrest.CoreMatchers.equalTo;
2727
import static org.hamcrest.core.IsNot.not;
28-
import static org.junit.Assert.assertThat;
28+
import static org.hamcrest.MatcherAssert.assertThat;
2929

3030
/**
3131
* Verifies that named test targets can be identified correctly as part of a group or as an individual test target.

flutter-idea/testSrc/unit/io/flutter/utils/AsyncRateLimiterTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import static java.util.concurrent.CompletableFuture.supplyAsync;
2424
import static org.hamcrest.core.Is.is;
25+
import static org.hamcrest.MatcherAssert.assertThat;
2526
import static org.junit.Assert.*;
2627

2728
public class AsyncRateLimiterTest {

flutter-idea/testSrc/unit/io/flutter/utils/EventStreamTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.concurrent.ExecutionException;
2121

2222
import static org.hamcrest.core.Is.is;
23-
import static org.junit.Assert.assertThat;
23+
import static org.hamcrest.MatcherAssert.assertThat;
2424
import static org.junit.Assert.fail;
2525

2626
public class EventStreamTest {

flutter-idea/testSrc/unit/io/flutter/utils/ThreadUtilTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import static org.hamcrest.CoreMatchers.hasItem;
1616
import static org.hamcrest.CoreMatchers.not;
17-
import static org.junit.Assert.assertThat;
17+
import static org.hamcrest.MatcherAssert.assertThat;
1818

1919
public class ThreadUtilTest {
2020
@Test

0 commit comments

Comments
 (0)