Compare commits

...
7 Commits
Author SHA1 Message Date
KKlochko 32bd931afc Update the CI/CD configuration to publish the artifacts to the release.
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-10-19 13:29:58 +03:00
KKlochko 29b11f454f Update the CHANGELOG. 2023-10-19 13:29:27 +03:00
KKlochko ec1053741e Update the version. 2023-10-19 13:28:36 +03:00
KKlochko d5dbf2942d Fix the validators's test have two variant of the order for methods.
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-10-19 09:35:45 +03:00
KKlochko a6831ed77e Update the CHANGELOG.
continuous-integration/drone/push Build is failing
2023-10-18 22:22:52 +03:00
KKlochko d06a76e1e3 Update the version. 2023-10-18 22:22:23 +03:00
KKlochko 8cdb151357 Update the README. 2023-10-18 22:22:00 +03:00
7 changed files with 145 additions and 31 deletions
+34
View File
@@ -18,7 +18,41 @@ name: maven
steps: steps:
- name: test - name: test
image: maven:3.9.4-eclipse-temurin-17-alpine image: maven:3.9.4-eclipse-temurin-17-alpine
volumes:
- name: package_cache
path: /root/.m2/
commands: commands:
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- mvn test -B - mvn test -B
- name: build
image: maven:3.9.4-eclipse-temurin-17-alpine
volumes:
- name: package_cache
path: /root/.m2/
commands:
- mvn package -Dmaven.test.skip=true
- name: gitea_release
image: plugins/gitea-release
settings:
api_key:
from_secret: API_KEY
base_url:
from_secret: BASE_URL
files:
- target/*.jar
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
when:
event: tag
volumes:
- name: package_cache
temp: {}
+40
View File
@@ -7,6 +7,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.13.4] - 2023-30-19
### Changed
- Update the version.
- Update the CHANGELOG.
- Update the CI/CD configuration to publish the artifacts to the release.
## [0.13.3] - 2023-30-19
### Fixed
- Fix the validators's test have two variant of the order for methods.
## [0.13.2] - 2023-30-18
### Changed
- Update the README.
- Update the version.
- Update the CHANGELOG.
## [0.13.1] - 2023-30-18
### Changed
- Add the license, LGPLv3.
## [0.13.0] - 2023-30-18
### Added
- Add validators to show error if a test method is invalid.
- Add a Calculator and its tests.
- Add the invalid tests.
- Add the tests for test validators.
### Fixed
- Fix the given-when-then tests to have public methods.
- Fix the test count for ClassLoader's test.
### Changed
- Update the block to run only a public method.
- Update the TestCommandFactory to have the validators.
## [0.12.7] - 2023-30-16 ## [0.12.7] - 2023-30-16
### Added ### Added
-27
View File
@@ -1,27 +0,0 @@
== simple-jbdd
This project is a simple BDD framework.
The project uses the https://github.com/spockframework/[Spock Framework Example Project^]
=== Prerequisites
- JDK 17 or higher
- Maven use `mvnw` wrapper
- Gradle use `gradlew` wrapper
=== Building with Gradle
Type:
./gradlew clean test
Downloaded files (including the Gradle distribution itself) will be stored in the Gradle user home directory (typically *user_home*`/.gradle`).
=== Building with Maven
Type:
./mvnw clean test
Downloaded files will be stored in the local Maven repository (typically *user_home*`/.m2/repository`).
+67
View File
@@ -0,0 +1,67 @@
# simple-jbdd
This project is a simple BDD framework.
The project uses the [Spock Framework Example Project](https://github.com/spockframework/)
## Prerequisites
- JDK 17 or higher
- Maven use `mvnw` wrapper
- Gradle use `gradlew` wrapper
## Building with Gradle
Downloaded files (including the Gradle distribution itself) will be stored in the Gradle user home directory (typically **user_home**`/.gradle`).
Type: test
```shell
./gradlew clean test
```
Type: build
```shell
./gradlew clean build
```
Type: run with asserts
```shell
java -ea -jar ./build/libs/simple_jbdd-0.13.4-all.jar
```
## Building with Maven
Downloaded files will be stored in the local Maven repository (typically **user_home**`/.m2/repository`).
Type: test
```shell
./mvnw clean test
```
Type: build
```shell
./mvnw clean package
```
Type: run with asserts
```shell
java -ea -jar ./target/simple_jbdd-0.13.4.jar
```
## Building with Maven
Kostiantyn Klochko (c) 2023
## License
Under the GNU Lesser General Public License v3.0 or later.
+1 -1
View File
@@ -4,7 +4,7 @@ plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2' id 'com.github.johnrengelman.shadow' version '7.1.2'
} }
version = "1.0" version = "0.13.4"
description = "simple-jbdd is a simple BDD testing framework for Java." description = "simple-jbdd is a simple BDD testing framework for Java."
application { application {
+1 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>space.kklochko</groupId> <groupId>space.kklochko</groupId>
<artifactId>simple_jbdd</artifactId> <artifactId>simple_jbdd</artifactId>
<version>1.0-SNAPSHOT</version> <version>0.13.4</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>simple-jbdd</name> <name>simple-jbdd</name>
@@ -49,11 +49,11 @@ class IntegratedValidatorsSpec extends Specification {
def message = validator.getMessage() def message = validator.getMessage()
then: "The message must be expected" then: "The message must be expected"
message == expectedMessage message ==~ expectedMessage
where: "Possible variants of tests" where: "Possible variants of tests"
validator | testClass || expectedMessage validator | testClass || expectedMessage
new HasMethodsWithArgumentsValidator() | HasMethodArgumentsTest.class || "ERROR!!! Methods must have no arguments!!! Check methods: given, setupArguments!!!" new HasMethodsWithArgumentsValidator() | HasMethodArgumentsTest.class || "ERROR!!! Methods must have no arguments!!! Check methods: (given|setupArguments), (given|setupArguments)!!!"
new HasMethodsWithArgumentsValidator() | SimpleGivenWhenThenTest.class || "ok" new HasMethodsWithArgumentsValidator() | SimpleGivenWhenThenTest.class || "ok"
new HasNonVoidMethodsValidator() | HasNonVoidMethodTest.class || "ERROR!!! Methods must have the void type!!! Check methods: then!!!" new HasNonVoidMethodsValidator() | HasNonVoidMethodTest.class || "ERROR!!! Methods must have the void type!!! Check methods: then!!!"
new HasMethodsWithArgumentsValidator() | SimpleGivenWhenThenTest.class || "ok" new HasMethodsWithArgumentsValidator() | SimpleGivenWhenThenTest.class || "ok"