#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>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -18,7 +18,7 @@
*/
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.mapstruct.test.model.Foo;

View File

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

View File

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

View File

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

View File

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

View File

@ -18,7 +18,7 @@
*/
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;

View File

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

View File

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

View File

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

View File

@ -18,7 +18,7 @@
*/
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.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.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

View File

@ -18,7 +18,7 @@
*/
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.mapstruct.itest.naming.GolfPlayer;

View File

@ -42,6 +42,8 @@
<toolchain-jdk-vendor></toolchain-jdk-vendor>
<compiler-id></compiler-id>
<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>
<profiles>
@ -160,8 +162,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -18,7 +18,7 @@
*/
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.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.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

View File

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

View File

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

View File

@ -18,7 +18,7 @@
*/
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.util.List;

View File

@ -18,7 +18,7 @@
*/
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.util.List;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.List;
@ -68,7 +68,7 @@ public class ArrayMappingTest {
.scientistsToDtos( new Scientist[]{ new Scientist( "Bob" ), new Scientist( "Larry" ) } );
assertThat( dtos ).isNotNull();
assertThat( dtos ).onProperty( "name" ).containsOnly( "Bob", "Larry" );
assertThat( dtos ).extracting( "name" ).containsOnly( "Bob", "Larry" );
}
@Test
@ -77,7 +77,7 @@ public class ArrayMappingTest {
.scientistsToDtos( Arrays.asList( new Scientist( "Bob" ), new Scientist( "Larry" ) ) );
assertThat( dtos ).isNotNull();
assertThat( dtos ).onProperty( "name" ).containsOnly( "Bob", "Larry" );
assertThat( dtos ).extracting( "name" ).containsOnly( "Bob", "Larry" );
}
@Test
@ -86,7 +86,7 @@ public class ArrayMappingTest {
.scientistsToDtosAsList( new Scientist[]{ new Scientist( "Bob" ), new Scientist( "Larry" ) } );
assertThat( dtos ).isNotNull();
assertThat( dtos ).onProperty( "name" ).containsOnly( "Bob", "Larry" );
assertThat( dtos ).extracting( "name" ).containsOnly( "Bob", "Larry" );
}
@Test
@ -99,7 +99,7 @@ public class ArrayMappingTest {
assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob" );
assertThat( target ).extracting( "name" ).containsOnly( "Bob" );
}
@Test
@ -112,7 +112,7 @@ public class ArrayMappingTest {
assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob", "Larry" );
assertThat( target ).extracting( "name" ).containsOnly( "Bob", "Larry" );
}
@Test
@ -126,7 +126,7 @@ public class ArrayMappingTest {
assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob", "Larry", "John" );
assertThat( target ).extracting( "name" ).containsOnly( "Bob", "Larry", "John" );
}
@Test
@ -139,7 +139,7 @@ public class ArrayMappingTest {
ScientistDto[] target = ScienceMapper.INSTANCE.scientistsToDtos( null, existingTarget );
assertThat( target ).isNull();
assertThat( existingTarget ).onProperty( "name" ).containsOnly( "Jim" );
assertThat( existingTarget ).extracting( "name" ).containsOnly( "Jim" );
}
@IssueKey("534")

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.HashMap;

View File

@ -18,7 +18,7 @@
*/
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.Map;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.List;
@ -50,6 +50,6 @@ public class GenericContainerTest {
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;
import static org.fest.assertions.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.SimpleDateFormat;

View File

@ -18,7 +18,7 @@
*/
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.Arrays;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.Arrays;

View File

@ -18,7 +18,7 @@
*/
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.assertTrue;

View File

@ -18,8 +18,8 @@
*/
package org.mapstruct.ap.test.collection.defaultimplementation;
import static org.fest.assertions.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
import java.util.ArrayList;
import java.util.Arrays;
@ -192,7 +192,7 @@ public class DefaultCollectionImplementationTest {
private void assertResultMap(Map<String, TargetFoo> result) {
assertThat( result ).isNotNull();
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() {

View File

@ -18,8 +18,8 @@
*/
package org.mapstruct.ap.test.collection.defaultimplementation;
import static org.fest.assertions.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
import java.util.Arrays;
import java.util.HashMap;
@ -53,7 +53,7 @@ public class NoSetterCollectionMappingTest {
NoSetterTarget target = NoSetterMapper.INSTANCE.toTarget( source );
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
@ -68,7 +68,7 @@ public class NoSetterCollectionMappingTest {
assertThat( target2.getListValues() ).containsExactly( "baz" );
assertThat( target2.getMapValues() ).isSameAs( originalMapInstance );
// 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;
import static org.fest.assertions.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Map;

View File

@ -18,7 +18,7 @@
*/
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;

View File

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

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.Arrays;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.BigInteger;

View File

@ -18,7 +18,7 @@
*/
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.Date;

View File

@ -18,7 +18,7 @@
*/
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.LocalDateTime;

View File

@ -18,7 +18,7 @@
*/
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.Locale;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -32,8 +32,8 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import static org.fest.assertions.Assertions.assertThat;
import static org.fest.assertions.MapAssert.entry;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
@WithClasses({
Source.class,
@ -151,11 +151,11 @@ public class NumberFormatConversionTest {
Map<String, String> target = SourceTargetMapper.INSTANCE.sourceToTarget( source1 );
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 );
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;
import static org.fest.assertions.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -19,7 +19,7 @@
package org.mapstruct.ap.test.decorator.jsr330;
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;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.List;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.Test;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.HashMap;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;
@ -51,7 +51,7 @@ public class MapperWithGenericSuperClassTest {
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 );
}
}

View File

@ -19,7 +19,7 @@
package org.mapstruct.ap.test.ignore;
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.Test;

View File

@ -18,7 +18,7 @@
*/
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.Test;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;
@ -66,7 +66,7 @@ public class SourceTypeContainsCollectionWithExtendsBoundTest {
SpaceshipDto spaceshipDto = SpaceshipMapper.INSTANCE.spaceshipToDto( spaceship );
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( Spaceship.class );

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

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

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.GregorianCalendar;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.assertTrue;

View File

@ -31,7 +31,7 @@ import org.mapstruct.ap.testutil.IssueKey;
import org.mapstruct.ap.testutil.WithClasses;
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.ChartEntryComposed;
import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntryLabel;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;
import org.mapstruct.ap.test.nestedsourceproperties._target.ChartEntry;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.HashMap;

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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;

View File

@ -18,7 +18,7 @@
*/
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.List;

View File

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

View File

@ -18,7 +18,7 @@
*/
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.runner.RunWith;

View File

@ -18,7 +18,7 @@
*/
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.Test;

View File

@ -18,7 +18,7 @@
*/
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;

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