-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into release-0.10.2
Signed-off-by: Peter Gafert <[email protected]>
- Loading branch information
Showing
34 changed files
with
859 additions
and
181 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
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
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
32 changes: 32 additions & 0 deletions
32
archunit-integration-test/src/test/java/com/tngtech/archunit/testutils/ExpectedField.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,32 @@ | ||
package com.tngtech.archunit.testutils; | ||
|
||
import com.tngtech.archunit.core.domain.JavaModifier; | ||
|
||
import static java.lang.String.format; | ||
|
||
public class ExpectedField { | ||
|
||
public static ExpectedField.Creator of(Class<?> owner, String fieldName) { | ||
return new ExpectedField.Creator(owner, fieldName); | ||
} | ||
|
||
public static class Creator { | ||
private final Class<?> clazz; | ||
private final String fieldName; | ||
|
||
private Creator(Class<?> clazz, String fieldName) { | ||
this.clazz = clazz; | ||
this.fieldName = fieldName; | ||
} | ||
|
||
public ExpectedMessage doesNotHaveModifier(JavaModifier modifier) { | ||
return field("does not have modifier " + modifier); | ||
} | ||
|
||
private ExpectedMessage field(String message) { | ||
String fieldDescription = format("Field <%s.%s>", clazz.getName(), fieldName); | ||
String sourceCodeLocation = format("(%s.java:0)", clazz.getSimpleName()); | ||
return new ExpectedMessage(format("%s %s in %s", fieldDescription, message, sourceCodeLocation)); | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.