#860 switch to using assertj instead of FEST assertions

This commit is contained in:
Filip Hrisafov 2016-08-27 13:10:42 +02:00 committed by Andreas Gudian
parent c05d44845d
commit cf88cf9e92
121 changed files with 170 additions and 167 deletions

View File

@ -44,8 +44,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.easytesting</groupId> <groupId>org.assertj</groupId>
<artifactId>fest-assert</artifactId> <artifactId>assertj-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.factory; package org.mapstruct.factory;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.mapstruct.test.model.Foo; import org.mapstruct.test.model.Foo;

View File

@ -50,8 +50,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.easytesting</groupId> <groupId>org.assertj</groupId>
<artifactId>fest-assert</artifactId> <artifactId>assertj-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -49,8 +49,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.easytesting</groupId> <groupId>org.assertj</groupId>
<artifactId>fest-assert</artifactId> <artifactId>assertj-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -45,8 +45,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.easytesting</groupId> <groupId>org.assertj</groupId>
<artifactId>fest-assert</artifactId> <artifactId>assertj-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.itest.cdi; package org.mapstruct.itest.cdi;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import javax.inject.Inject; import javax.inject.Inject;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.ignore; package org.mapstruct.ap.test.ignore;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;

View File

@ -21,7 +21,7 @@ package org.mapstruct.ap.test.bugs._603;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
public class Issue603Test { public class Issue603Test {

View File

@ -20,7 +20,7 @@ package org.mapstruct.ap.test.bugs._636;
import org.junit.Test; import org.junit.Test;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
public class Issue636Test { public class Issue636Test {

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.itest.java8; package org.mapstruct.itest.java8;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.itest.jaxb; package org.mapstruct.itest.jaxb;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.text.ParseException; import java.text.ParseException;

View File

@ -29,7 +29,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Test for generation of JSR-330-based Mapper implementations * Test for generation of JSR-330-based Mapper implementations

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.itest.naming; package org.mapstruct.itest.naming;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.mapstruct.itest.naming.GolfPlayer; import org.mapstruct.itest.naming.GolfPlayer;

View File

@ -42,6 +42,8 @@
<toolchain-jdk-vendor></toolchain-jdk-vendor> <toolchain-jdk-vendor></toolchain-jdk-vendor>
<compiler-id></compiler-id> <compiler-id></compiler-id>
<compiler-source-target-version></compiler-source-target-version> <compiler-source-target-version></compiler-source-target-version>
<!-- As Mapstruct has java 6 requirement we need to use AssertJ 1.x which is compatible with java 6 -->
<assertj.version>1.7.1</assertj.version>
</properties> </properties>
<profiles> <profiles>
@ -160,8 +162,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.easytesting</groupId> <groupId>org.assertj</groupId>
<artifactId>fest-assert</artifactId> <artifactId>assertj-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.itest.simple; package org.mapstruct.itest.simple;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.mapstruct.itest.simple.Source; import org.mapstruct.itest.simple.Source;

View File

@ -27,7 +27,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Test for generation of Spring-based Mapper implementations * Test for generation of Spring-based Mapper implementations

View File

@ -50,6 +50,7 @@
<com.puppycrawl.tools.checkstyle.version>6.14.1</com.puppycrawl.tools.checkstyle.version> <com.puppycrawl.tools.checkstyle.version>6.14.1</com.puppycrawl.tools.checkstyle.version>
<add.release.arguments /> <add.release.arguments />
<forkCount>1</forkCount> <forkCount>1</forkCount>
<assertj.version>3.5.2</assertj.version>
</properties> </properties>
<licenses> <licenses>
@ -105,9 +106,9 @@
<version>2.3.21</version> <version>2.3.21</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.easytesting</groupId> <groupId>org.assertj</groupId>
<artifactId>fest-assert</artifactId> <artifactId>assertj-core</artifactId>
<version>1.4</version> <version>${assertj.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>

View File

@ -70,8 +70,8 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.easytesting</groupId> <groupId>org.assertj</groupId>
<artifactId>fest-assert</artifactId> <artifactId>assertj-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.internal.model.common; package org.mapstruct.ap.internal.model.common;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.util.List; import java.util.List;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.internal.model.common; package org.mapstruct.ap.internal.model.common;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.util.List; import java.util.List;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.internal.model.common; package org.mapstruct.ap.internal.model.common;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.abstractclass; package org.mapstruct.ap.test.abstractclass;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.abstractclass.generics; package org.mapstruct.ap.test.abstractclass.generics;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.array; package org.mapstruct.ap.test.array;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -68,7 +68,7 @@ public class ArrayMappingTest {
.scientistsToDtos( new Scientist[]{ new Scientist( "Bob" ), new Scientist( "Larry" ) } ); .scientistsToDtos( new Scientist[]{ new Scientist( "Bob" ), new Scientist( "Larry" ) } );
assertThat( dtos ).isNotNull(); assertThat( dtos ).isNotNull();
assertThat( dtos ).onProperty( "name" ).containsOnly( "Bob", "Larry" ); assertThat( dtos ).extracting( "name" ).containsOnly( "Bob", "Larry" );
} }
@Test @Test
@ -77,7 +77,7 @@ public class ArrayMappingTest {
.scientistsToDtos( Arrays.asList( new Scientist( "Bob" ), new Scientist( "Larry" ) ) ); .scientistsToDtos( Arrays.asList( new Scientist( "Bob" ), new Scientist( "Larry" ) ) );
assertThat( dtos ).isNotNull(); assertThat( dtos ).isNotNull();
assertThat( dtos ).onProperty( "name" ).containsOnly( "Bob", "Larry" ); assertThat( dtos ).extracting( "name" ).containsOnly( "Bob", "Larry" );
} }
@Test @Test
@ -86,7 +86,7 @@ public class ArrayMappingTest {
.scientistsToDtosAsList( new Scientist[]{ new Scientist( "Bob" ), new Scientist( "Larry" ) } ); .scientistsToDtosAsList( new Scientist[]{ new Scientist( "Bob" ), new Scientist( "Larry" ) } );
assertThat( dtos ).isNotNull(); assertThat( dtos ).isNotNull();
assertThat( dtos ).onProperty( "name" ).containsOnly( "Bob", "Larry" ); assertThat( dtos ).extracting( "name" ).containsOnly( "Bob", "Larry" );
} }
@Test @Test
@ -99,7 +99,7 @@ public class ArrayMappingTest {
assertThat( target ).isNotNull(); assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget ); assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob" ); assertThat( target ).extracting( "name" ).containsOnly( "Bob" );
} }
@Test @Test
@ -112,7 +112,7 @@ public class ArrayMappingTest {
assertThat( target ).isNotNull(); assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget ); assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob", "Larry" ); assertThat( target ).extracting( "name" ).containsOnly( "Bob", "Larry" );
} }
@Test @Test
@ -126,7 +126,7 @@ public class ArrayMappingTest {
assertThat( target ).isNotNull(); assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget ); assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob", "Larry", "John" ); assertThat( target ).extracting( "name" ).containsOnly( "Bob", "Larry", "John" );
} }
@Test @Test
@ -139,7 +139,7 @@ public class ArrayMappingTest {
ScientistDto[] target = ScienceMapper.INSTANCE.scientistsToDtos( null, existingTarget ); ScientistDto[] target = ScienceMapper.INSTANCE.scientistsToDtos( null, existingTarget );
assertThat( target ).isNull(); assertThat( target ).isNull();
assertThat( existingTarget ).onProperty( "name" ).containsOnly( "Jim" ); assertThat( existingTarget ).extracting( "name" ).containsOnly( "Jim" );
} }
@IssueKey("534") @IssueKey("534")

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bool; package org.mapstruct.ap.test.bool;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._289; package org.mapstruct.ap.test.bugs._289;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._374; package org.mapstruct.ap.test.bugs._374;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._394; package org.mapstruct.ap.test.bugs._394;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._516; package org.mapstruct.ap.test.bugs._516;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._577; package org.mapstruct.ap.test.bugs._577;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._580; package org.mapstruct.ap.test.bugs._580;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.time.LocalDate; import java.time.LocalDate;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._581; package org.mapstruct.ap.test.bugs._581;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._625; package org.mapstruct.ap.test.bugs._625;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._634; package org.mapstruct.ap.test.bugs._634;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -50,6 +50,6 @@ public class GenericContainerTest {
Target<Bar> target = SourceTargetMapper.INSTANCE.mapSourceToTarget( source ); Target<Bar> target = SourceTargetMapper.INSTANCE.mapSourceToTarget( source );
assertThat( target.getContent() ).onProperty( "value" ).containsExactly( 42L, 84L ); assertThat( target.getContent() ).extracting( "value" ).containsExactly( 42L, 84L );
} }
} }

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._775; package org.mapstruct.ap.test.bugs._775;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.bugs._855; package org.mapstruct.ap.test.bugs._855;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.builtin; package org.mapstruct.ap.test.builtin;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.callbacks; package org.mapstruct.ap.test.callbacks;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.callbacks.ongeneratedmethods; package org.mapstruct.ap.test.callbacks.ongeneratedmethods;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.callbacks.typematching; package org.mapstruct.ap.test.callbacks.typematching;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.collection; package org.mapstruct.ap.test.collection;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.collection.adder; package org.mapstruct.ap.test.collection.adder;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;

View File

@ -18,8 +18,8 @@
*/ */
package org.mapstruct.ap.test.collection.defaultimplementation; package org.mapstruct.ap.test.collection.defaultimplementation;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry; import static org.assertj.core.api.Assertions.entry;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -192,7 +192,7 @@ public class DefaultCollectionImplementationTest {
private void assertResultMap(Map<String, TargetFoo> result) { private void assertResultMap(Map<String, TargetFoo> result) {
assertThat( result ).isNotNull(); assertThat( result ).isNotNull();
assertThat( result ).hasSize( 2 ); assertThat( result ).hasSize( 2 );
assertThat( result ).includes( entry( "1", new TargetFoo( "Bob" ) ), entry( "2", new TargetFoo( "Alice" ) ) ); assertThat( result ).contains( entry( "1", new TargetFoo( "Bob" ) ), entry( "2", new TargetFoo( "Alice" ) ) );
} }
private Map<Long, SourceFoo> createSourceFooMap() { private Map<Long, SourceFoo> createSourceFooMap() {

View File

@ -18,8 +18,8 @@
*/ */
package org.mapstruct.ap.test.collection.defaultimplementation; package org.mapstruct.ap.test.collection.defaultimplementation;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry; import static org.assertj.core.api.Assertions.entry;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
@ -53,7 +53,7 @@ public class NoSetterCollectionMappingTest {
NoSetterTarget target = NoSetterMapper.INSTANCE.toTarget( source ); NoSetterTarget target = NoSetterMapper.INSTANCE.toTarget( source );
assertThat( target.getListValues() ).containsExactly( "foo", "bar" ); assertThat( target.getListValues() ).containsExactly( "foo", "bar" );
assertThat( target.getMapValues() ).includes( entry( "fooKey", "fooVal" ), entry( "barKey", "barVal" ) ); assertThat( target.getMapValues() ).contains( entry( "fooKey", "fooVal" ), entry( "barKey", "barVal" ) );
// now test existing instances // now test existing instances
@ -68,7 +68,7 @@ public class NoSetterCollectionMappingTest {
assertThat( target2.getListValues() ).containsExactly( "baz" ); assertThat( target2.getListValues() ).containsExactly( "baz" );
assertThat( target2.getMapValues() ).isSameAs( originalMapInstance ); assertThat( target2.getMapValues() ).isSameAs( originalMapInstance );
// source2 mapvalues is empty, so the map is not cleared // source2 mapvalues is empty, so the map is not cleared
assertThat( target2.getMapValues() ).includes( entry( "fooKey", "fooVal" ), entry( "barKey", "barVal" ) ); assertThat( target2.getMapValues() ).contains( entry( "fooKey", "fooVal" ), entry( "barKey", "barVal" ) );
} }

View File

@ -19,7 +19,7 @@
package org.mapstruct.ap.test.collection.forged; package org.mapstruct.ap.test.collection.forged;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Map; import java.util.Map;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.collection.iterabletononiterable; package org.mapstruct.ap.test.collection.iterabletononiterable;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;

View File

@ -18,8 +18,8 @@
*/ */
package org.mapstruct.ap.test.collection.map; package org.mapstruct.ap.test.collection.map;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry; import static org.assertj.core.api.Assertions.entry;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
@ -53,7 +53,7 @@ public class MapMappingTest {
assertThat( target ).isNotNull(); assertThat( target ).isNotNull();
assertThat( target ).hasSize( 2 ); assertThat( target ).hasSize( 2 );
assertThat( target ).includes( assertThat( target ).contains(
entry( "42", "01.01.1980" ), entry( "42", "01.01.1980" ),
entry( "121", "20.07.2013" ) entry( "121", "20.07.2013" )
); );
@ -100,7 +100,7 @@ public class MapMappingTest {
private void assertResult(Map<Long, Date> target) { private void assertResult(Map<Long, Date> target) {
assertThat( target ).isNotNull(); assertThat( target ).isNotNull();
assertThat( target ).hasSize( 2 ); assertThat( target ).hasSize( 2 );
assertThat( target ).includes( assertThat( target ).contains(
entry( 42L, new GregorianCalendar( 1980, 0, 1 ).getTime() ), entry( 42L, new GregorianCalendar( 1980, 0, 1 ).getTime() ),
entry( 121L, new GregorianCalendar( 2013, 6, 20 ).getTime() ) entry( 121L, new GregorianCalendar( 2013, 6, 20 ).getTime() )
); );
@ -127,7 +127,7 @@ public class MapMappingTest {
assertThat( target ).isNotNull(); assertThat( target ).isNotNull();
assertThat( target.getValues() ).isNotNull(); assertThat( target.getValues() ).isNotNull();
assertThat( target.getValues() ).hasSize( 2 ); assertThat( target.getValues() ).hasSize( 2 );
assertThat( target.getValues() ).includes( assertThat( target.getValues() ).contains(
entry( "42", "01.01.1980" ), entry( "42", "01.01.1980" ),
entry( "121", "20.07.2013" ) entry( "121", "20.07.2013" )
); );
@ -145,7 +145,7 @@ public class MapMappingTest {
assertThat( source ).isNotNull(); assertThat( source ).isNotNull();
assertThat( source.getValues() ).isNotNull(); assertThat( source.getValues() ).isNotNull();
assertThat( source.getValues() ).hasSize( 2 ); assertThat( source.getValues() ).hasSize( 2 );
assertThat( source.getValues() ).includes( assertThat( source.getValues() ).contains(
entry( 42L, new GregorianCalendar( 1980, 0, 1 ).getTime() ), entry( 42L, new GregorianCalendar( 1980, 0, 1 ).getTime() ),
entry( 121L, new GregorianCalendar( 2013, 6, 20 ).getTime() ) entry( 121L, new GregorianCalendar( 2013, 6, 20 ).getTime() )
); );

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.collection.wildcard; package org.mapstruct.ap.test.collection.wildcard;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.math.BigDecimal; import java.math.BigDecimal;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.complex; package org.mapstruct.ap.test.complex;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion; package org.mapstruct.ap.test.conversion;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.bignumbers; package org.mapstruct.ap.test.conversion.bignumbers;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.date; package org.mapstruct.ap.test.conversion.date;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.java8time; package org.mapstruct.ap.test.conversion.java8time;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.jodatime; package org.mapstruct.ap.test.conversion.jodatime;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Calendar; import java.util.Calendar;
import java.util.Locale; import java.util.Locale;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.nativetypes; package org.mapstruct.ap.test.conversion.nativetypes;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.nativetypes; package org.mapstruct.ap.test.conversion.nativetypes;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.nativetypes; package org.mapstruct.ap.test.conversion.nativetypes;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -32,8 +32,8 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry; import static org.assertj.core.api.Assertions.entry;
@WithClasses({ @WithClasses({
Source.class, Source.class,
@ -151,11 +151,11 @@ public class NumberFormatConversionTest {
Map<String, String> target = SourceTargetMapper.INSTANCE.sourceToTarget( source1 ); Map<String, String> target = SourceTargetMapper.INSTANCE.sourceToTarget( source1 );
assertThat( target ).hasSize( 1 ); assertThat( target ).hasSize( 1 );
assertThat( target ).includes( entry( "1.00", "2" ) ); assertThat( target ).contains( entry( "1.00", "2" ) );
Map<Float, Float> source2 = SourceTargetMapper.INSTANCE.targetToSource( target ); Map<Float, Float> source2 = SourceTargetMapper.INSTANCE.targetToSource( target );
assertThat( source2 ).hasSize( 1 ); assertThat( source2 ).hasSize( 1 );
assertThat( source2 ).includes( entry( 1.00f, 2f ) ); assertThat( source2 ).contains( entry( 1.00f, 2f ) );
} }
} }

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.precedence; package org.mapstruct.ap.test.conversion.precedence;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.conversion.string; package org.mapstruct.ap.test.conversion.string;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.decorator; package org.mapstruct.ap.test.decorator;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Calendar; import java.util.Calendar;

View File

@ -19,7 +19,7 @@
package org.mapstruct.ap.test.decorator.jsr330; package org.mapstruct.ap.test.decorator.jsr330;
import static java.lang.System.lineSeparator; import static java.lang.System.lineSeparator;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Calendar; import java.util.Calendar;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.decorator.spring; package org.mapstruct.ap.test.decorator.spring;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Calendar; import java.util.Calendar;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.defaultvalue; package org.mapstruct.ap.test.defaultvalue;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.text.ParseException; import java.text.ParseException;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.dependency; package org.mapstruct.ap.test.dependency;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.dependency; package org.mapstruct.ap.test.dependency;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.destination; package org.mapstruct.ap.test.destination;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.destination; package org.mapstruct.ap.test.destination;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.enums; package org.mapstruct.ap.test.enums;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.factories; package org.mapstruct.ap.test.factories;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.generics; package org.mapstruct.ap.test.generics;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.generics.genericsupertype; package org.mapstruct.ap.test.generics.genericsupertype;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;
@ -51,7 +51,7 @@ public class MapperWithGenericSuperClassTest {
SearchResult<VesselDto> dtos = VesselSearchResultMapper.INSTANCE.vesselSearchResultToDto( vessels ); SearchResult<VesselDto> dtos = VesselSearchResultMapper.INSTANCE.vesselSearchResultToDto( vessels );
assertThat( dtos.getValues() ).onProperty( "name" ).containsExactly( "Pacific Queen" ); assertThat( dtos.getValues() ).extracting( "name" ).containsExactly( "Pacific Queen" );
assertThat( dtos.getSize() ).isEqualTo( 1L ); assertThat( dtos.getSize() ).isEqualTo( 1L );
} }
} }

View File

@ -19,7 +19,7 @@
package org.mapstruct.ap.test.ignore; package org.mapstruct.ap.test.ignore;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.imports; package org.mapstruct.ap.test.imports;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.imports; package org.mapstruct.ap.test.imports;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.imports.decorator; package org.mapstruct.ap.test.imports.decorator;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.imports.sourcewithextendsbound; package org.mapstruct.ap.test.imports.sourcewithextendsbound;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Collections; import java.util.Collections;
@ -66,7 +66,7 @@ public class SourceTypeContainsCollectionWithExtendsBoundTest {
SpaceshipDto spaceshipDto = SpaceshipMapper.INSTANCE.spaceshipToDto( spaceship ); SpaceshipDto spaceshipDto = SpaceshipMapper.INSTANCE.spaceshipToDto( spaceship );
assertThat( spaceshipDto ).isNotNull(); assertThat( spaceshipDto ).isNotNull();
assertThat( spaceshipDto.getAstronauts() ).onProperty( "name" ).containsOnly( "Bob" ); assertThat( spaceshipDto.getAstronauts() ).extracting( "name" ).containsOnly( "Bob" );
generatedSource.forMapper( SpaceshipMapper.class ).containsImportFor( Astronaut.class ); generatedSource.forMapper( SpaceshipMapper.class ).containsImportFor( Astronaut.class );
generatedSource.forMapper( SpaceshipMapper.class ).containsImportFor( Spaceship.class ); generatedSource.forMapper( SpaceshipMapper.class ).containsImportFor( Spaceship.class );

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.inheritance; package org.mapstruct.ap.test.inheritance;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.inheritance.attribute; package org.mapstruct.ap.test.inheritance.attribute;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.inheritance.complex; package org.mapstruct.ap.test.inheritance.complex;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.inheritedmappingmethod; package org.mapstruct.ap.test.inheritedmappingmethod;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.inheritfromconfig; package org.mapstruct.ap.test.inheritfromconfig;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.mapperconfig; package org.mapstruct.ap.test.mapperconfig;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,8 +18,8 @@
*/ */
package org.mapstruct.ap.test.naming; package org.mapstruct.ap.test.naming;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry; import static org.assertj.core.api.Assertions.entry;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
@ -62,7 +62,7 @@ public class VariableNamingTest {
assertThat( target.getValues() ).containsOnly( "42", "121" ); assertThat( target.getValues() ).containsOnly( "42", "121" );
assertThat( target.getSomeNumber() ).isEqualTo( "42" ); assertThat( target.getSomeNumber() ).isEqualTo( "42" );
assertThat( target.getMap() ).hasSize( 2 ); assertThat( target.getMap() ).hasSize( 2 );
assertThat( target.getMap() ).includes( assertThat( target.getMap() ).contains(
entry( "42", "01.01.1980" ), entry( "42", "01.01.1980" ),
entry( "121", "20.07.2013" ) entry( "121", "20.07.2013" )
); );

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.naming.spi; package org.mapstruct.ap.test.naming.spi;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.nestedmethodcall; package org.mapstruct.ap.test.nestedmethodcall;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.nestedsource.parameter; package org.mapstruct.ap.test.nestedsource.parameter;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.nestedsourceproperties; package org.mapstruct.ap.test.nestedsourceproperties;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;

View File

@ -31,7 +31,7 @@ import org.mapstruct.ap.testutil.IssueKey;
import org.mapstruct.ap.testutil.WithClasses; import org.mapstruct.ap.testutil.WithClasses;
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner; import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.mapstruct.ap.test.nestedsourceproperties._target.BaseChartEntry; import org.mapstruct.ap.test.nestedsourceproperties._target.BaseChartEntry;
import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryComposed; import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryComposed;
import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryLabel; import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryLabel;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.nestedtargetproperties; package org.mapstruct.ap.test.nestedtargetproperties;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry; import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.nonvoidsetter; package org.mapstruct.ap.test.nonvoidsetter;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.nullcheck; package org.mapstruct.ap.test.nullcheck;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.nullvaluemapping; package org.mapstruct.ap.test.nullvaluemapping;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.oneway; package org.mapstruct.ap.test.oneway;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.prism; package org.mapstruct.ap.test.prism;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.prism; package org.mapstruct.ap.test.prism;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -18,8 +18,8 @@
*/ */
package org.mapstruct.ap.test.references; package org.mapstruct.ap.test.references;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry; import static org.assertj.core.api.Assertions.entry;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
@ -73,7 +73,7 @@ public class ReferencedMapperTest {
public void shouldUseGenericFactoryForIterable() { public void shouldUseGenericFactoryForIterable() {
List<SomeType> result = SourceTargetMapper.INSTANCE.fromStringList( Arrays.asList( "foo1", "foo2" ) ); List<SomeType> result = SourceTargetMapper.INSTANCE.fromStringList( Arrays.asList( "foo1", "foo2" ) );
assertThat( result ).onProperty( "value" ).containsExactly( "foo1", "foo2" ); assertThat( result ).extracting( "value" ).containsExactly( "foo1", "foo2" );
} }
@Test @Test
@ -85,7 +85,7 @@ public class ReferencedMapperTest {
Map<SomeType, SomeOtherType> result = SourceTargetMapper.INSTANCE.fromStringMap( source ); Map<SomeType, SomeOtherType> result = SourceTargetMapper.INSTANCE.fromStringMap( source );
assertThat( result ).hasSize( 2 ); assertThat( result ).hasSize( 2 );
assertThat( result ).includes( assertThat( result ).contains(
entry( new SomeType( "foo1" ), new SomeOtherType( "bar1" ) ), entry( new SomeType( "foo1" ), new SomeOtherType( "bar1" ) ),
entry( new SomeType( "foo2" ), new SomeOtherType( "bar2" ) ) ); entry( new SomeType( "foo2" ), new SomeOtherType( "bar2" ) ) );
} }

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.references.samename; package org.mapstruct.ap.test.references.samename;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.references.statics; package org.mapstruct.ap.test.references.statics;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;

View File

@ -18,7 +18,7 @@
*/ */
package org.mapstruct.ap.test.reverse; package org.mapstruct.ap.test.reverse;
import static org.fest.assertions.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;

Some files were not shown because too many files have changed in this diff Show More