-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from averak/revert-19-feature/16-setup-testtuils
Revert "テスティングユーティリティを作成"
- Loading branch information
Showing
22 changed files
with
28 additions
and
463 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
rootProject.name = "gsync" | ||
include(":testkit") |
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
8 changes: 2 additions & 6 deletions
8
src/main/kotlin/net/averak/gsync/adapter/handler/exception/NotFoundExceptionMapper.kt
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 |
---|---|---|
@@ -1,19 +1,15 @@ | ||
package net.averak.gsync.adapter.handler.exception | ||
|
||
import jakarta.ws.rs.NotFoundException | ||
import jakarta.ws.rs.core.MediaType | ||
import jakarta.ws.rs.core.Response | ||
import jakarta.ws.rs.ext.ExceptionMapper | ||
import jakarta.ws.rs.ext.Provider | ||
import net.averak.gsync.core.exception.ErrorCode | ||
import org.apache.http.HttpStatus | ||
|
||
@Provider | ||
class NotFoundExceptionMapper : ExceptionMapper<NotFoundException> { | ||
override fun toResponse(exception: NotFoundException?): Response { | ||
return Response | ||
.status(Response.Status.NOT_FOUND) | ||
.type(MediaType.APPLICATION_JSON_TYPE) | ||
.entity(ErrorResponse(ErrorCode.NOT_FOUND_API)) | ||
.build() | ||
return Response.status(HttpStatus.SC_NOT_FOUND).entity(ErrorResponse(ErrorCode.NOT_FOUND_API)).build() | ||
} | ||
} |
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
5 changes: 0 additions & 5 deletions
5
src/main/kotlin/net/averak/gsync/core/exception/GsyncException.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
src/main/kotlin/net/averak/gsync/domain/primitive/common/ID.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,31 +1,8 @@ | ||
package net.averak.gsync | ||
|
||
import io.quarkus.arc.All | ||
import io.quarkus.test.junit.QuarkusTest | ||
import jakarta.annotation.PostConstruct | ||
import jakarta.inject.Inject | ||
import net.averak.gsync.core.exception.GsyncException | ||
import net.averak.gsync.testkit.Faker | ||
import net.averak.gsync.testkit.IRandomizer | ||
import spock.lang.Specification | ||
|
||
@QuarkusTest | ||
abstract class AbstractSpec extends Specification { | ||
|
||
@Inject | ||
@All | ||
List<IRandomizer> randomizers | ||
|
||
@PostConstruct | ||
void init() { | ||
Faker.init(randomizers) | ||
} | ||
|
||
/** | ||
* 例外を検証 | ||
*/ | ||
static void verify(final GsyncException actual, final GsyncException expected) { | ||
assert actual.errorCode == expected.errorCode | ||
} | ||
|
||
} |
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
39 changes: 0 additions & 39 deletions
39
src/test/groovy/net/averak/gsync/domain/primitive/common/ID_UT.groovy
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/test/groovy/net/averak/gsync/randomizer/domain/primitive/common/IDRandomizer.groovy
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/test/groovy/net/averak/gsync/usecase/AbstractUsecase_UT.groovy
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/test/groovy/net/averak/gsync/usecase/EchoUsecase_UT.groovy
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.