-
Notifications
You must be signed in to change notification settings - Fork 100
Add metadata for Mockito 4.8.1 #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,4 @@ | ||
[ | ||
"reflect-config.json", | ||
"resource-config.json" | ||
] |
201 changes: 201 additions & 0 deletions
201
metadata/org.mockito/mockito-core/4.8.1/reflect-config.json
This file contains hidden or 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,201 @@ | ||
[ | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.debugging.Java9PlusLocationImpl$MetadataShim" | ||
}, | ||
"name": "java.lang.Object", | ||
"methods": [ | ||
{ | ||
"name": "toString", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.debugging.Java9PlusLocationImpl" | ||
}, | ||
"name": "java.lang.StackWalker", | ||
"methods": [ | ||
{ | ||
"name": "getInstance", | ||
"parameterTypes": [ | ||
"java.util.Set", | ||
"int" | ||
] | ||
}, | ||
{ | ||
"name": "walk", | ||
"parameterTypes": [ | ||
"java.util.function.Function" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.debugging.LocationFactory" | ||
}, | ||
"name": "java.lang.StackWalker" | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.debugging.Java9PlusLocationImpl" | ||
}, | ||
"name": "java.lang.StackWalker$Option" | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.debugging.Java9PlusLocationImpl" | ||
}, | ||
"name": "java.lang.StackWalker$StackFrame" | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.debugging.Java9PlusLocationImpl$MetadataShim" | ||
}, | ||
"name": "java.lang.StackWalker$StackFrame", | ||
"methods": [ | ||
{ | ||
"name": "getClassName", | ||
"parameterTypes": [] | ||
}, | ||
{ | ||
"name": "getFileName", | ||
"parameterTypes": [] | ||
}, | ||
{ | ||
"name": "getLineNumber", | ||
"parameterTypes": [] | ||
}, | ||
{ | ||
"name": "getMethodName", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.creation.proxy.InvokeDefaultProxy" | ||
}, | ||
"name": "java.lang.reflect.InvocationHandler", | ||
"methods": [ | ||
{ | ||
"name": "invokeDefault", | ||
"parameterTypes": [ | ||
"java.lang.Object", | ||
"java.lang.reflect.Method", | ||
"java.lang.Object[]" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.util.KotlinInlineClassUtil" | ||
}, | ||
"name": "kotlin.jvm.JvmInline" | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.ClassPathLoader" | ||
}, | ||
"name": "org.mockito.configuration.MockitoConfiguration" | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.DefaultMockitoPlugins" | ||
}, | ||
"name": "org.mockito.internal.configuration.DefaultDoNotMockEnforcer", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.DefaultMockitoPlugins" | ||
}, | ||
"name": "org.mockito.internal.configuration.InjectingAnnotationEngine", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.DefaultMockitoPlugins" | ||
}, | ||
"name": "org.mockito.internal.configuration.plugins.DefaultPluginSwitch", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.DefaultMockitoPlugins" | ||
}, | ||
"name": "org.mockito.internal.creation.instance.DefaultInstantiatorProvider", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.PluginInitializer" | ||
}, | ||
"name": "org.mockito.internal.creation.proxy.ProxyMockMaker", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.DefaultMockitoPlugins" | ||
}, | ||
"name": "org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleanerProvider", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.DefaultMockitoPlugins" | ||
}, | ||
"name": "org.mockito.internal.util.ConsoleMockitoLogger", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.DefaultMockitoPlugins" | ||
}, | ||
"name": "org.mockito.internal.util.reflection.ReflectionMemberAccessor", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [] | ||
} | ||
] | ||
} | ||
] |
13 changes: 13 additions & 0 deletions
13
metadata/org.mockito/mockito-core/4.8.1/resource-config.json
This file contains hidden or 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,13 @@ | ||
{ | ||
"resources": { | ||
"includes": [ | ||
{ | ||
"condition": { | ||
"typeReachable": "org.mockito.internal.configuration.plugins.PluginInitializer" | ||
}, | ||
"pattern": "\\Qmockito-extensions/org.mockito.plugins.MockMaker\\E" | ||
} | ||
] | ||
}, | ||
"bundles": [] | ||
} |
This file contains hidden or 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,10 @@ | ||
[ | ||
{ | ||
"latest": true, | ||
"metadata-version": "4.8.1", | ||
"module": "org.mockito:mockito-core", | ||
"tested-versions": [ | ||
"4.8.1" | ||
] | ||
} | ||
] |
This file contains hidden or 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 hidden or 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,4 @@ | ||
gradlew.bat | ||
gradlew | ||
gradle/ | ||
build/ |
This file contains hidden or 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,6 @@ | ||
# Mockito | ||
|
||
Mockito works in GraalVM when using the `org.mockito.internal.creation.proxy.ProxyMockMaker`, which uses JDK proxies | ||
to mock interfaces, and interfaces only. | ||
|
||
Metadata has been collected by using the agent. |
This file contains hidden or 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,33 @@ | ||
/* | ||
* Copyright and related rights waived via CC0 | ||
* | ||
* You should have received a copy of the CC0 legalcode along with this | ||
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
*/ | ||
|
||
plugins { | ||
id "org.graalvm.internal.tck" | ||
} | ||
|
||
String libraryVersion = tck.testedLibraryVersion.get() | ||
|
||
dependencies { | ||
testImplementation "org.mockito:mockito-core:$libraryVersion" | ||
testImplementation 'org.assertj:assertj-core:3.22.0' | ||
} | ||
|
||
graalvmNative { | ||
agent { | ||
defaultMode = "conditional" | ||
modes { | ||
conditional { | ||
userCodeFilterPath = "user-code-filter.json" | ||
} | ||
} | ||
metadataCopy { | ||
mergeWithExisting = true | ||
inputTaskNames.add("test") | ||
outputDirectories.add("src/test/resources/META-INF/native-image/org.mockito/mockito-core") | ||
} | ||
} | ||
} |
This file contains hidden or 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,2 @@ | ||
library.version=4.8.1 | ||
metadata.dir=org.mockito/mockito-core/4.8.1 |
This file contains hidden or 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,20 @@ | ||
/* | ||
* Copyright and related rights waived via CC0 | ||
* | ||
* You should have received a copy of the CC0 legalcode along with this | ||
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
*/ | ||
|
||
pluginManagement { | ||
def tckPath = Objects.requireNonNullElse( | ||
System.getenv("GVM_TCK_TCKDIR"), | ||
"../../../../tck-build-logic" | ||
) | ||
includeBuild(tckPath) | ||
} | ||
|
||
plugins { | ||
id "org.graalvm.internal.tck-settings" version "1.0.0-SNAPSHOT" | ||
} | ||
|
||
rootProject.name = 'org.mockito.mockito-core_tests' |
21 changes: 21 additions & 0 deletions
21
...rc/org.mockito/mockito-core/4.8.1/src/test/java/org_mockito/mockito_core/MockitoTest.java
This file contains hidden or 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,21 @@ | ||
/* | ||
* Copyright and related rights waived via CC0 | ||
* | ||
* You should have received a copy of the CC0 legalcode along with this | ||
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
*/ | ||
package org_mockito.mockito_core; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.mockito.Mockito; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class MockitoTest { | ||
@Test | ||
void test() { | ||
MyService myService = Mockito.mock(MyService.class); | ||
Mockito.when(myService.getGreeting()).thenReturn("Hello Mockito"); | ||
assertThat(myService.getGreeting()).isEqualTo("Hello Mockito"); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
.../src/org.mockito/mockito-core/4.8.1/src/test/java/org_mockito/mockito_core/MyService.java
This file contains hidden or 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,11 @@ | ||
/* | ||
* Copyright and related rights waived via CC0 | ||
* | ||
* You should have received a copy of the CC0 legalcode along with this | ||
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
*/ | ||
package org_mockito.mockito_core; | ||
|
||
public interface MyService { | ||
String getGreeting(); | ||
} |
7 changes: 7 additions & 0 deletions
7
...ockito/mockito-core/4.8.1/src/test/resources/META-INF/native-image/test/proxy-config.json
This file contains hidden or 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,7 @@ | ||
[ | ||
{ | ||
"interfaces": [ | ||
"org_mockito.mockito_core.MyService" | ||
] | ||
} | ||
] |
1 change: 1 addition & 0 deletions
1
...to/mockito-core/4.8.1/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
This file contains hidden or 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 @@ | ||
org.mockito.internal.creation.proxy.ProxyMockMaker | ||
10 changes: 10 additions & 0 deletions
10
tests/src/org.mockito/mockito-core/4.8.1/user-code-filter.json
This file contains hidden or 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,10 @@ | ||
{ | ||
"rules": [ | ||
{ | ||
"excludeClasses": "**" | ||
}, | ||
{ | ||
"includeClasses": "org.mockito.**" | ||
} | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.