diff --git a/build.gradle b/build.gradle index 3dfe6504..ec90bb34 100644 --- a/build.gradle +++ b/build.gradle @@ -304,8 +304,6 @@ project('spring-statemachine-kryo') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } testCompile 'org.springframework:spring-test' - testCompile 'org.hamcrest:hamcrest-core' - testCompile 'org.hamcrest:hamcrest-library' testCompile("org.junit.jupiter:junit-jupiter-api") testCompile("org.junit.jupiter:junit-jupiter-engine") testRuntime 'org.apache.logging.log4j:log4j-core' diff --git a/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/KryoStateMachineSerialisationServiceTests.java b/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/KryoStateMachineSerialisationServiceTests.java index df011170..6b8cb404 100644 --- a/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/KryoStateMachineSerialisationServiceTests.java +++ b/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/KryoStateMachineSerialisationServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2020 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. @@ -15,8 +15,7 @@ */ package org.springframework.statemachine.kryo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import java.util.ArrayList; import java.util.List; @@ -50,6 +49,6 @@ public class KryoStateMachineSerialisationServiceTests { byte[] bytes = service.serialiseStateMachineContext(root); StateMachineContext context = service.deserialiseStateMachineContext(bytes); - assertThat(context.getChilds().size(), is(2)); + assertThat(context.getChilds()).hasSize(2); } } diff --git a/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/StateMachineContextSerializerTests.java b/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/StateMachineContextSerializerTests.java index 0bc68b7a..e30ac7b4 100644 --- a/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/StateMachineContextSerializerTests.java +++ b/spring-statemachine-kryo/src/test/java/org/springframework/statemachine/kryo/StateMachineContextSerializerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 the original author or authors. + * Copyright 2018-2020 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. @@ -15,8 +15,7 @@ */ package org.springframework.statemachine.kryo; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -98,7 +97,7 @@ public class StateMachineContextSerializerTests { Input inputTo = new Input(new ByteArrayInputStream(outStreamFrom.toByteArray())); StateMachineContext rootTo = (StateMachineContext) kryoTo.readClassAndObject(inputTo); - assertThat(rootFrom, equalTo(rootTo)); + assertThat(rootFrom).isEqualTo(rootTo); } /**