-
-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix AssertJ code generation (#5673)
- Loading branch information
1 parent
4a8df19
commit e6c8087
Showing
150 changed files
with
782 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/test/java/spoon/testing/assertions/CtAbstractInvocationAssert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtAbstractInvocation; | ||
public class CtAbstractInvocationAssert extends AbstractObjectAssert<CtAbstractInvocationAssert, CtAbstractInvocation<?>> implements CtAbstractInvocationAssertInterface<CtAbstractInvocationAssert, CtAbstractInvocation<?>> { | ||
CtAbstractInvocationAssert(CtAbstractInvocation<?> actual) { | ||
super(actual, CtAbstractInvocationAssert.class); | ||
} | ||
|
||
@Override | ||
public CtAbstractInvocationAssert self() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public CtAbstractInvocation<?> actual() { | ||
return this.actual; | ||
} | ||
|
||
@Override | ||
public void failWithMessage(String errorMessage, Object... arguments) { | ||
super.failWithMessage(errorMessage, arguments); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/test/java/spoon/testing/assertions/CtAbstractSwitchAssert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtAbstractSwitch; | ||
public class CtAbstractSwitchAssert extends AbstractObjectAssert<CtAbstractSwitchAssert, CtAbstractSwitch<?>> implements CtAbstractSwitchAssertInterface<CtAbstractSwitchAssert, CtAbstractSwitch<?>> { | ||
CtAbstractSwitchAssert(CtAbstractSwitch<?> actual) { | ||
super(actual, CtAbstractSwitchAssert.class); | ||
} | ||
|
||
@Override | ||
public CtAbstractSwitchAssert self() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public CtAbstractSwitch<?> actual() { | ||
return this.actual; | ||
} | ||
|
||
@Override | ||
public void failWithMessage(String errorMessage, Object... arguments) { | ||
super.failWithMessage(errorMessage, arguments); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/test/java/spoon/testing/assertions/CtActualTypeContainerAssert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.reference.CtActualTypeContainer; | ||
public class CtActualTypeContainerAssert extends AbstractObjectAssert<CtActualTypeContainerAssert, CtActualTypeContainer> implements CtActualTypeContainerAssertInterface<CtActualTypeContainerAssert, CtActualTypeContainer> { | ||
CtActualTypeContainerAssert(CtActualTypeContainer actual) { | ||
super(actual, CtActualTypeContainerAssert.class); | ||
} | ||
|
||
@Override | ||
public CtActualTypeContainerAssert self() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public CtActualTypeContainer actual() { | ||
return this.actual; | ||
} | ||
|
||
@Override | ||
public void failWithMessage(String errorMessage, Object... arguments) { | ||
super.failWithMessage(errorMessage, arguments); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtAnnotationFieldAccessAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtAnnotationMethodAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtAnnotationTypeAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.declaration.CtAnnotationType; | ||
interface CtAnnotationTypeAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtAnnotationType<?>> extends SpoonAssert<A, W> , CtTypeAssertInterface<A, W> {} | ||
public interface CtAnnotationTypeAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtAnnotationType<?>> extends SpoonAssert<A, W> , CtTypeAssertInterface<A, W> {} |
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtAnonymousExecutableAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.declaration.CtAnonymousExecutable; | ||
interface CtAnonymousExecutableAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtAnonymousExecutable> extends SpoonAssert<A, W> , CtExecutableAssertInterface<A, W> , CtTypeMemberAssertInterface<A, W> {} | ||
public interface CtAnonymousExecutableAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtAnonymousExecutable> extends SpoonAssert<A, W> , CtExecutableAssertInterface<A, W> , CtTypeMemberAssertInterface<A, W> {} |
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtArrayAccessAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtArrayReadAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtArrayRead; | ||
interface CtArrayReadAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtArrayRead<?>> extends SpoonAssert<A, W> , CtArrayAccessAssertInterface<A, W> {} | ||
public interface CtArrayReadAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtArrayRead<?>> extends SpoonAssert<A, W> , CtArrayAccessAssertInterface<A, W> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtArrayWriteAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtArrayWrite; | ||
interface CtArrayWriteAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtArrayWrite<?>> extends SpoonAssert<A, W> , CtArrayAccessAssertInterface<A, W> {} | ||
public interface CtArrayWriteAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtArrayWrite<?>> extends SpoonAssert<A, W> , CtArrayAccessAssertInterface<A, W> {} |
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtAssertAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtAssignmentAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtBlockAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtBlock; | ||
interface CtBlockAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtBlock<?>> extends SpoonAssert<A, W> , CtStatementAssertInterface<A, W> , CtStatementListAssertInterface<A, W> {} | ||
public interface CtBlockAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtBlock<?>> extends SpoonAssert<A, W> , CtStatementAssertInterface<A, W> , CtStatementListAssertInterface<A, W> {} |
23 changes: 23 additions & 0 deletions
23
src/test/java/spoon/testing/assertions/CtBodyHolderAssert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtBodyHolder; | ||
public class CtBodyHolderAssert extends AbstractObjectAssert<CtBodyHolderAssert, CtBodyHolder> implements CtBodyHolderAssertInterface<CtBodyHolderAssert, CtBodyHolder> { | ||
CtBodyHolderAssert(CtBodyHolder actual) { | ||
super(actual, CtBodyHolderAssert.class); | ||
} | ||
|
||
@Override | ||
public CtBodyHolderAssert self() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public CtBodyHolder actual() { | ||
return this.actual; | ||
} | ||
|
||
@Override | ||
public void failWithMessage(String errorMessage, Object... arguments) { | ||
super.failWithMessage(errorMessage, arguments); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtBodyHolderAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtBreakAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtBreak; | ||
interface CtBreakAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtBreak> extends SpoonAssert<A, W> , CtLabelledFlowBreakAssertInterface<A, W> {} | ||
public interface CtBreakAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtBreak> extends SpoonAssert<A, W> , CtLabelledFlowBreakAssertInterface<A, W> {} |
23 changes: 23 additions & 0 deletions
23
src/test/java/spoon/testing/assertions/CtCFlowBreakAssert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtCFlowBreak; | ||
public class CtCFlowBreakAssert extends AbstractObjectAssert<CtCFlowBreakAssert, CtCFlowBreak> implements CtCFlowBreakAssertInterface<CtCFlowBreakAssert, CtCFlowBreak> { | ||
CtCFlowBreakAssert(CtCFlowBreak actual) { | ||
super(actual, CtCFlowBreakAssert.class); | ||
} | ||
|
||
@Override | ||
public CtCFlowBreakAssert self() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public CtCFlowBreak actual() { | ||
return this.actual; | ||
} | ||
|
||
@Override | ||
public void failWithMessage(String errorMessage, Object... arguments) { | ||
super.failWithMessage(errorMessage, arguments); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtCFlowBreakAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtCFlowBreak; | ||
interface CtCFlowBreakAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtCFlowBreak> extends SpoonAssert<A, W> , CtStatementAssertInterface<A, W> {} | ||
public interface CtCFlowBreakAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtCFlowBreak> extends SpoonAssert<A, W> , CtStatementAssertInterface<A, W> {} |
7 changes: 6 additions & 1 deletion
7
src/test/java/spoon/testing/assertions/CtCaseAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractBooleanAssert; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import org.assertj.core.api.Assertions; | ||
import org.assertj.core.api.ListAssert; | ||
import org.assertj.core.api.ObjectAssert; | ||
import spoon.reflect.code.CaseKind; | ||
import spoon.reflect.code.CtCase; | ||
import spoon.reflect.code.CtExpression; | ||
interface CtCaseAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtCase<?>> extends SpoonAssert<A, W> , CtStatementAssertInterface<A, W> , CtStatementListAssertInterface<A, W> { | ||
public interface CtCaseAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtCase<?>> extends SpoonAssert<A, W> , CtStatementAssertInterface<A, W> , CtStatementListAssertInterface<A, W> { | ||
default ListAssert<CtExpression<?>> getCaseExpressions() { | ||
return Assertions.assertThat(actual().getCaseExpressions()); | ||
} | ||
|
||
default ObjectAssert<CaseKind> getCaseKind() { | ||
return Assertions.assertThatObject(actual().getCaseKind()); | ||
} | ||
|
||
default AbstractBooleanAssert<?> getIncludesDefault() { | ||
return Assertions.assertThat(actual().getIncludesDefault()); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/test/java/spoon/testing/assertions/CtCasePatternAssert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtCasePattern; | ||
public class CtCasePatternAssert extends AbstractObjectAssert<CtCasePatternAssert, CtCasePattern> implements CtCasePatternAssertInterface<CtCasePatternAssert, CtCasePattern> { | ||
CtCasePatternAssert(CtCasePattern actual) { | ||
super(actual, CtCasePatternAssert.class); | ||
} | ||
|
||
@Override | ||
public CtCasePatternAssert self() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public CtCasePattern actual() { | ||
return this.actual; | ||
} | ||
|
||
@Override | ||
public void failWithMessage(String errorMessage, Object... arguments) { | ||
super.failWithMessage(errorMessage, arguments); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/test/java/spoon/testing/assertions/CtCasePatternAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.code.CtCasePattern; | ||
public interface CtCasePatternAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtCasePattern> extends SpoonAssert<A, W> , CtExpressionAssertInterface<A, W> { | ||
default CtExpressionAssertInterface<?, ?> getGuard() { | ||
return SpoonAssertions.assertThat(actual().getGuard()); | ||
} | ||
|
||
default CtPatternAssertInterface<?, ?> getPattern() { | ||
return SpoonAssertions.assertThat(actual().getPattern()); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtCatchAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtCatchVariableAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/spoon/testing/assertions/CtCatchVariableReferenceAssertInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package spoon.testing.assertions; | ||
import org.assertj.core.api.AbstractObjectAssert; | ||
import spoon.reflect.reference.CtCatchVariableReference; | ||
interface CtCatchVariableReferenceAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtCatchVariableReference<?>> extends CtVariableReferenceAssertInterface<A, W> , SpoonAssert<A, W> {} | ||
public interface CtCatchVariableReferenceAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtCatchVariableReference<?>> extends CtVariableReferenceAssertInterface<A, W> , SpoonAssert<A, W> {} |
Oops, something went wrong.