Skip to content

Commit

Permalink
Rename test module as suggested by @ar and @fgonzal
Browse files Browse the repository at this point in the history
Also:
- rename unused parameter to ignored.
- fixed code example in README.md
  • Loading branch information
alcarraz committed Oct 24, 2023
1 parent 034fab1 commit 9ae3486
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
9 changes: 5 additions & 4 deletions modules/test/README.md → modules/testcore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ In the following example, if the logger does not already exist, a default one, t
```java
@ExtendWith(LogSupplierExtension.class)
class LogTest {
@LogSource (logger="Q2", realm="log-test")
@LogSource(logger = "Q2", realm = "log-test")
Log log;

@Test
public void testDebug(){
public void testDebug() {
log.debug("debug called");
}
}
```


Expand Down Expand Up @@ -71,4 +72,4 @@ class MUXSupplierExtensionTest {
assertSame(response, mux.request(request, 1000L));
}
}
```
```
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,13 @@ public void beforeEach(ExtensionContext context) throws IllegalArgumentException
*
* @param parameterContext the context for the parameter for which an argument should
* be resolved; never {@code null}
* @param extensionContext the extension context for the {@code Executable}
* about to be invoked; never {@code null}
* @param ignored unused
* @return {@code true} if this resolver can resolve an argument for the parameter
* @see #resolveParameter
* @see ParameterContext
*/
@Override
public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException {
public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext ignored) throws ParameterResolutionException {
return parameterContext.isAnnotated(LogSource.class) && parameterContext.getTarget().map(Object::getClass).filter(c -> c.isAssignableFrom(LogSource.class)).isPresent();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected void setUp(ExtensionContext context, boolean beforeAll) {
* @param afterAll if this is for an afterAll method unregister only static muxes otherwise only instences.
*/
protected void tearDown(ExtensionContext context, boolean afterAll){
runOnFields(context, afterAll, (f, annotation) -> NameRegistrar.unregister("mux." + annotation.name()));
runOnFields(context, afterAll, (ignored, annotation) -> NameRegistrar.unregister("mux." + annotation.name()));

}
/**
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ include ':modules:core',
':modules:seqno',
':modules:db-flyway',
':modules:elasticsearch',
':modules:bom'
':modules:test'
':modules:bom',
':modules:testcore'


rootProject.name = 'jposee'
Expand Down

0 comments on commit 9ae3486

Please sign in to comment.