Skip to content

Commit 8fe4de7

Browse files
authored
Bumped hamcrest to 2.2 (#590)
* Bumped hamcrest to 2.2 * updated to hamcrest 2.2
1 parent fcb33ef commit 8fe4de7

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

quickfixj-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
</dependency>
3434
<dependency>
3535
<groupId>org.hamcrest</groupId>
36-
<artifactId>hamcrest-all</artifactId>
37-
<version>1.1</version>
36+
<artifactId>hamcrest</artifactId>
37+
<version>2.2</version>
3838
<scope>test</scope>
3939
</dependency>
4040
<dependency>

quickfixj-core/src/test/java/quickfix/DefaultDataDictionaryProviderTest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919

2020
package quickfix;
2121

22-
import static org.hamcrest.Matchers.*;
23-
import static org.junit.Assert.*;
22+
import static org.hamcrest.MatcherAssert.assertThat;
23+
import static org.hamcrest.Matchers.containsString;
24+
import static org.hamcrest.Matchers.instanceOf;
25+
import static org.hamcrest.Matchers.is;
26+
import static org.hamcrest.Matchers.notNullValue;
27+
import static org.hamcrest.Matchers.nullValue;
2428
import static quickfix.field.ApplVerID.*;
2529

2630
import org.junit.BeforeClass;
@@ -77,7 +81,7 @@ public void throwExceptionIfSessionDictionaryIsNotFound() throws Exception {
7781
try {
7882
provider.getSessionDataDictionary("FIX44_Invalid_Test");
7983
} catch (QFJException e) {
80-
assertThat(e.getCause(), is(ConfigError.class));
84+
assertThat(e.getCause(), instanceOf(ConfigError.class));
8185
}
8286
}
8387

quickfixj-core/src/test/java/quickfix/MessageUtilsTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@
3333
import quickfix.fix40.Logon;
3434
import quickfix.fix50.Email;
3535

36+
import static org.hamcrest.Matchers.instanceOf;
3637
import static org.hamcrest.Matchers.is;
3738
import static org.hamcrest.Matchers.notNullValue;
39+
import static org.hamcrest.MatcherAssert.assertThat;
3840
import static org.junit.Assert.assertEquals;
3941
import static org.junit.Assert.assertNull;
40-
import static org.junit.Assert.assertThat;
4142
import static org.junit.Assert.fail;
4243
import org.junit.Test;
4344
import static org.mockito.ArgumentMatchers.any;
@@ -194,7 +195,7 @@ public void testParseFixt() throws Exception {
194195
Message message = MessageUtils.parse(mockSession, email.toString());
195196

196197
assertThat(message, is(notNullValue()));
197-
assertThat(message, is(quickfix.fix40.Email.class));
198+
assertThat(message, instanceOf(quickfix.fix40.Email.class));
198199
}
199200

200201
@Test
@@ -210,7 +211,7 @@ public void testParseFixtLogon() throws Exception {
210211
Message message = MessageUtils.parse(mockSession, logon.toString());
211212

212213
assertThat(message, is(notNullValue()));
213-
assertThat(message, is(quickfix.fixt11.Logon.class));
214+
assertThat(message, instanceOf(quickfix.fixt11.Logon.class));
214215
}
215216

216217
@Test
@@ -225,7 +226,7 @@ public void testParseFixtLogout() throws Exception {
225226
Message message = MessageUtils.parse(mockSession, logout.toString());
226227

227228
assertThat(message, is(notNullValue()));
228-
assertThat(message, is(quickfix.fixt11.Logout.class));
229+
assertThat(message, instanceOf(quickfix.fixt11.Logout.class));
229230
}
230231

231232
@Test
@@ -243,7 +244,7 @@ public void testParseFix50() throws Exception {
243244
Message message = MessageUtils.parse(mockSession, email.toString());
244245

245246
assertThat(message, is(notNullValue()));
246-
assertThat(message, is(quickfix.fix50.Email.class));
247+
assertThat(message, instanceOf(quickfix.fix50.Email.class));
247248
}
248249

249250
// QFJ-973

0 commit comments

Comments
 (0)