Skip to content

Commit

Permalink
#860 switch to using assertj instead of FEST assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphr authored and agudian committed Aug 27, 2016
1 parent c05d448 commit cf88cf9
Show file tree
Hide file tree
Showing 121 changed files with 170 additions and 167 deletions.
4 changes: 2 additions & 2 deletions core-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions core-jdk8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions integrationtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import org.junit.Test;

import static org.fest.assertions.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;

public class Issue636Test {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions integrationtest/src/test/resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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
Expand Down
7 changes: 4 additions & 3 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -68,7 +68,7 @@ public void shouldMapArrayToArray() {
.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
Expand All @@ -77,7 +77,7 @@ public void shouldMapListToArray() {
.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
Expand All @@ -86,7 +86,7 @@ public void shouldMapArrayToList() {
.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
Expand All @@ -99,7 +99,7 @@ public void shouldMapArrayToArrayExistingSmallerSizedTarget() {

assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob" );
assertThat( target ).extracting( "name" ).containsOnly( "Bob" );
}

@Test
Expand All @@ -112,7 +112,7 @@ public void shouldMapArrayToArrayExistingEqualSizedTarget() {

assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob", "Larry" );
assertThat( target ).extracting( "name" ).containsOnly( "Bob", "Larry" );
}

@Test
Expand All @@ -126,7 +126,7 @@ public void shouldMapArrayToArrayExistingLargerSizedTarget() {

assertThat( target ).isNotNull();
assertThat( target ).isEqualTo( existingTarget );
assertThat( target ).onProperty( "name" ).containsOnly( "Bob", "Larry", "John" );
assertThat( target ).extracting( "name" ).containsOnly( "Bob", "Larry", "John" );
}

@Test
Expand All @@ -139,7 +139,7 @@ public void shouldMapTargetToNullWhenNullSource() {
ScientistDto[] target = ScienceMapper.INSTANCE.scientistsToDtos( null, existingTarget );

assertThat( target ).isNull();
assertThat( existingTarget ).onProperty( "name" ).containsOnly( "Jim" );
assertThat( existingTarget ).extracting( "name" ).containsOnly( "Jim" );
}

@IssueKey("534")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit cf88cf9

Please sign in to comment.