Skip to content

Commit

Permalink
feat(#187): add it that reveals the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jun 22, 2023
1 parent 0eb207f commit 82ba266
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ you want to use specific (older) version of the plugin, for example `0.1.9`,
just run the next maven command with specified version:

```shell
mvn com.github.volodya-lombrozo:jtcop-maven-plugin:0.1.9:check
mvn com.github.volodya-lombrozo:jtcop-maven-plugin:0.1.16:check
```

### Add the plugin to your `pom.xml`
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ SOFTWARE.
<plugin>
<groupId>com.github.volodya-lombrozo</groupId>
<artifactId>jtcop-maven-plugin</artifactId>
<version>0.1.15</version>
<version>0.1.14</version>
<executions>
<execution>
<phase>verify</phase>
Expand Down
29 changes: 29 additions & 0 deletions src/it/all-have-production-class/src/test/java/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Volodya
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* Pckage of integration tests.
*
* @since 0.1.16
*/
package com.github.lombrozo.testnames.it;
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ private static Node fromCompilation(final CompilationUnit unit) {
.filter(node -> node instanceof TypeDeclaration<?>)
.collect(Collectors.toCollection(LinkedList::new));
if (all.isEmpty()) {
throw new IllegalStateException("Compilation unit has contain at least one class");
throw new IllegalStateException(
String.format(
"Compilation unit '%s' has contain at least one class",
unit
)
);
}
return all.element();
}
Expand Down

0 comments on commit 82ba266

Please sign in to comment.