Skip to content

Commit

Permalink
Merge pull request #407 from powerunit/issues/#401
Browse files Browse the repository at this point in the history
Issue #401 - Move to api - Breaking change
  • Loading branch information
boretti authored Mar 25, 2023
2 parents 3f8d5d3 + edbf428 commit e5e07f9
Show file tree
Hide file tree
Showing 110 changed files with 204 additions and 139 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Git : ![mergify-status](https://gh.mergify.io/badges/powerunit/powerunit-extensions-matchers.png?style=cut)


This is an extension to powerunit (a unit test framework for java 8) that doesn't require this framework, but provides generation of hamcrest matchers. [Please check the site for more information](http://powerunit.github.io/powerunit-extensions-matchers/)
This is an extension to powerunit (a unit test framework for java 8) that doesn't require this framework, but provides generation of hamcrest matchers.

**This version of the library doesn't support version below java 17**

Expand All @@ -25,3 +25,8 @@ public class PojoShort {
```

Matchers classes must be created by the annotation processor (in this example, named `PojoShortMatchers`).

# Upgrade to version 1.0.0

The version 1.0.0 breaks the package of the annotations. It will be necessary to replace the package
`ch.powerunit.extensions.matchers` by `ch.powerunit.extensions.matchers.api`.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
package ch.powerunit.extensions.matchers.samples.extensions.beanmatchers;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
package ch.powerunit.extensions.matchers.samples.extensions.beanmatchers;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Map;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;
import ch.powerunit.extensions.matchers.samples.extension.MyTestWithoutGeneric;
import ch.powerunit.extensions.matchers.samples.extension.MyTestWithoutGeneric2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import java.util.List;
import java.util.Set;

import ch.powerunit.extensions.matchers.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import java.io.Serializable;
import java.util.List;

import ch.powerunit.extensions.matchers.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import java.util.List;
import java.util.Set;

import ch.powerunit.extensions.matchers.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.IgnoreInMatcher;
import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.api.IgnoreInMatcher;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class Sample {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers(disableGenerationOfFactory = true)
public class Sample2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.LocalDateTime;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleLocalDateTime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.util.Optional;

import ch.powerunit.extensions.matchers.IgnoreInMatcher;
import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.IgnoreInMatcher;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;
import ch.powerunit.extensions.matchers.samples.extension.MyTestWithoutGeneric;
import ch.powerunit.extensions.matchers.samples.extension.MyTestWithoutGeneric2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.List;
import java.util.function.Supplier;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleSupplier {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SimplePojo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ch.powerunit.extensions.matchers.samples;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class TwoFieldsPojo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
*/
package ch.powerunit.extensions.matchers.samples.addmatcher;

import ch.powerunit.extensions.matchers.AddToMatcher;
import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.AddToMatcher;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class PojoWithOverrideField {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ch.powerunit.extensions.matchers.samples.extension;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class Includer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.apache.commons.lang3.tuple.Pair;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class MyPair<L,R> extends Pair<L, R> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.apache.commons.lang3.tuple.Pair;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers(allowWeakWithSameValue = true)
public class MyPair2<L,R> extends Pair<L, R> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import org.apache.commons.lang3.text.StrBuilder;

import ch.powerunit.extensions.matchers.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers(moreMethod = { ComplementaryExpositionMethod.CONTAINS, ComplementaryExpositionMethod.ARRAYCONTAINING,
ComplementaryExpositionMethod.HAS_ITEMS, ComplementaryExpositionMethod.ANY_OF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import org.apache.commons.lang3.text.StrBuilder;

import ch.powerunit.extensions.matchers.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ComplementaryExpositionMethod;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers(moreMethod = { ComplementaryExpositionMethod.CONTAINS, ComplementaryExpositionMethod.ARRAYCONTAINING,
ComplementaryExpositionMethod.HAS_ITEMS, ComplementaryExpositionMethod.ANY_OF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.Objects;
import javax.validation.Valid;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.List;
import java.util.Objects;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.Objects;
import java.util.Set;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.List;
import java.util.Set;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples.others;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples.others;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
package ch.powerunit.extensions.matchers.samples.others;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

/**
* @author borettim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples.third;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;
import ch.powerunit.extensions.matchers.samples.others.Pojo43;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples.third;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;
import ch.powerunit.extensions.matchers.samples.Pojo1;
import ch.powerunit.extensions.matchers.samples.Pojo3;
import ch.powerunit.extensions.matchers.samples.others.PojoRenameMatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
package ch.powerunit.extensions.matchers.samples.third;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;
import ch.powerunit.extensions.matchers.samples.Pojo1;

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

import java.time.LocalDate;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleLocalDate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.LocalDateTime;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleLocalDateTimeV2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.LocalTime;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleLocalTime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.ZonedDateTime;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleZonedDateTime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.LocalDate;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleLocalDate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.LocalDateTime;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleLocalDateTimeV2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.LocalTime;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleLocalTime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.time.ZonedDateTime;

import ch.powerunit.extensions.matchers.ProvideMatchers;
import ch.powerunit.extensions.matchers.api.ProvideMatchers;

@ProvideMatchers
public class SampleZonedDateTime {
Expand Down
Loading

0 comments on commit e5e07f9

Please sign in to comment.