Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename MethodContext to MethodInvocationContext
------------------------------------------------------------------------ On behalf of the community, the JUnit Lambda Team thanks msg systems ag (http://www.msg-systems.com) for supporting the JUnit crowdfunding campaign! ------------------------------------------------------------------------
- Loading branch information
Showing
13 changed files
with
136 additions
and
98 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
41 changes: 0 additions & 41 deletions
41
junit5-engine/src/main/java/org/junit/gen5/engine/junit5/descriptor/MethodContextImpl.java
This file was deleted.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
...src/main/java/org/junit/gen5/engine/junit5/descriptor/MethodInvocationContextFactory.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,55 @@ | ||
/* | ||
* Copyright 2015-2016 the original author or authors. | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License v1.0 which | ||
* accompanies this distribution and is available at | ||
* | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.junit.gen5.engine.junit5.descriptor; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
import org.junit.gen5.api.extension.MethodInvocationContext; | ||
|
||
/** | ||
* Factory for {@link MethodInvocationContext} instances. | ||
* | ||
* @since 5.0 | ||
*/ | ||
class MethodInvocationContextFactory { | ||
|
||
/** | ||
* Create a new {@link MethodInvocationContext} based on the supplied | ||
* {@code instance} and {@code method}. | ||
*/ | ||
static MethodInvocationContext methodInvocationContext(Object instance, Method method) { | ||
return new DefaultMethodInvocationContext(instance, method); | ||
} | ||
|
||
private static class DefaultMethodInvocationContext implements MethodInvocationContext { | ||
|
||
private final Object instance; | ||
|
||
private final Method method; | ||
|
||
private DefaultMethodInvocationContext(Object instance, Method method) { | ||
this.instance = instance; | ||
this.method = method; | ||
} | ||
|
||
@Override | ||
public Object getInstance() { | ||
return this.instance; | ||
} | ||
|
||
@Override | ||
public Method getMethod() { | ||
return this.method; | ||
} | ||
|
||
} | ||
|
||
} |
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.