Skip to content

Commit

Permalink
Enhance BaseWiremock and update Maven dependency plugin
Browse files Browse the repository at this point in the history
Refactored BaseWiremock to include a constructor accepting WireMockConfiguration and improved class documentation. Updated Maven dependency plugin configuration to include 'analyze-only' goal with adjusted settings.
  • Loading branch information
Konstantin Pavlov authored and Konstantin Pavlov committed Nov 9, 2024
1 parent 302a67b commit 8da6a70
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
9 changes: 9 additions & 0 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,19 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>properties</id>
<goals>
<goal>properties</goal>
</goals>
</execution>
<execution>
<goals>
<goal>analyze-only</goal>
</goals>
<configuration>
<ignoreNonCompile>true</ignoreNonCompile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@ package me.kpavlov.finchly.wiremock

import com.github.tomakehurst.wiremock.WireMockServer
import com.github.tomakehurst.wiremock.client.VerificationException
import com.github.tomakehurst.wiremock.core.WireMockConfiguration

/**
* Base class for managing a WireMock server instance.
* Abstract base class for managing a WireMock server instance.
*
* The server is started upon initialization.
* Provides utility methods for managing stub mappings and verifying unmatched requests.
* Server is started upon initialization
*
* @param mock The WireMock server instance to manage.
* @property mock The WireMock server instance.
*/
public abstract class BaseWiremock(
protected val mock: WireMockServer,
) {
/**
* Constructs a `BaseWiremock` instance with the specified `WireMockConfiguration`.
*
* @param options The configuration settings for initializing the `WireMockServer`.
*/
constructor(options: WireMockConfiguration) : this(WireMockServer(options))

init {
mock.start()
}
Expand Down

0 comments on commit 8da6a70

Please sign in to comment.