-
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.
- Loading branch information
Christoph Knoedlseder
committed
Oct 6, 2024
1 parent
b735623
commit 527fefc
Showing
18 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
src/main/resources/de/jsilbereisen/perfumator/data/perfumes/Assert_all.json
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,9 +1,9 @@ | ||
{ | ||
"name": "Assert all", | ||
"description": "By using an assertAll instead of multiple assertThat expressions, the programmer is informed about all results, even though some assertions may fail. In contrast, a failing assertThat would terminate the test execution.", | ||
"description": "The \"org.junit.jupiter.api.assertAll\" is used group multiple individual assertions together. The advantage of using this method to group the assertions instead of calling them individually is that if one assertion fails, the others are still executed. Therefore, the user gains insight on the results of all tests, instead of only the tests up to the failed assertion, where the thrown exception would otherwise terminate the test execution.", | ||
"detectorClassSimpleName": "AssertAllDetector", | ||
"i18nBaseBundleName": "assertAll", | ||
"sources": null, | ||
"relatedPattern": "SMELL", | ||
"sources": ["https://stackoverflow.com/questions/40796756/assertall-vs-multiple-assertions-in-junit5"], | ||
"relatedPattern": null, | ||
"additionalInformation": null | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/de/jsilbereisen/perfumator/data/perfumes/JFrame_dispose.json
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
4 changes: 2 additions & 2 deletions
4
src/main/resources/de/jsilbereisen/perfumator/data/perfumes/Parameterized_test.json
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
6 changes: 3 additions & 3 deletions
6
src/main/resources/de/jsilbereisen/perfumator/data/perfumes/Setup_and_teardown_methods.json
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,9 +1,9 @@ | ||
{ | ||
"name": "Setup or teardown method", | ||
"description": "Common setup and teardown tasks should preferably be performed inside methods annotated with either '@BeforeEach', '@BeforeAll', '@AfterEach' or '@AfterAll'. This can greatly reduce the boilerplate code inside individual tests.", | ||
"description": "Common setup and teardown tasks should preferably be performed inside methods annotated with either \"@BeforeEach\", \"@BeforeAll\", \"@AfterEach\" or \"@AfterAll\". This can greatly reduce the boilerplate code inside individual tests and makes the tests more focused on the actual logic that is being tested.", | ||
"detectorClassSimpleName": "SetupAndTeardownMethodDetector", | ||
"i18nBaseBundleName": "setupAndTeardownMethod", | ||
"sources": null, | ||
"i18nBaseBundleName": "setupAndTeardownMethods", | ||
"sources": ["https://www.baeldung.com/junit-before-beforeclass-beforeeach-beforeall"], | ||
"relatedPattern": "SMELL", | ||
"additionalInformation": null | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/de/jsilbereisen/perfumator/data/perfumes/Swing_timer.json
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
2 changes: 1 addition & 1 deletion
2
src/main/resources/de/jsilbereisen/perfumator/data/perfumes/Thread_safe_swing.json
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
Empty file.
3 changes: 3 additions & 0 deletions
3
.../resources/de/jsilbereisen/perfumator/i18n/perfumes/SetupAndTeardownMethods_de.properties
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ame=Setup und Teardown Methoden | ||
description=Gemeinsamer Setup- und Teardown-Code sollte vorzugsweise innerhalb von Methoden durchgeführt werden, die entweder mit "@BeforeEach", "@BeforeAll", "@AfterEach" oder "@AfterAll" annotiert sind. Auf diese Weise lässt sich Boilerplate-Code in den einzelnen Tests erheblich reduzieren und der Fokus liegt stärker auf der eigentlichen Logik, die getestet wird. | ||
source#1=https://www.baeldung.com/junit-before-beforeclass-beforeeach-beforeall |
Empty file.
3 changes: 3 additions & 0 deletions
3
src/main/resources/de/jsilbereisen/perfumator/i18n/perfumes/assertAll_de.properties
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name=Assert all | ||
description=Die Methode \"org.junit.jupiter.api.assertAll\" wird verwendet, um mehrere einzelne Assertions zusammenzufassen. Der Vorteil dieser Methode im Vergleich zu mehreren einzelnen Assertions besteht darin, dass bei einem Fehlschlag einer Assertion die folgenden Assertions trotzdem ausgeführt werden. Daher erhält der Benutzer die Ergebnisse aller Tests und nicht nur der Tests bis zur fehlgeschlagenen Assertions, die ansonsten die Ausführung des Tests beenden würde. | ||
source#1="https://stackoverflow.com/questions/40796756/assertall-vs-multiple-assertions-in-junit5" |
Empty file.
4 changes: 4 additions & 0 deletions
4
src/main/resources/de/jsilbereisen/perfumator/i18n/perfumes/jFrameDispose_de.properties
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name=JFrame dispose | ||
description=Anstelle der \"System.exit\" Methode, die die Java Virtual Machine vollständig beendet, schließt \"javax.swing.JFrame.dispose\" das JFrame Object und die ihm zugewiesenen Ressourcen auf kontrolliertere Weise. Wenn man die Anwendung auf diese Weise schließt, muss man sicherstellen, dass alle verbleibenden Threads programmatisch beendet werden. Dies mag zwar wie ein Nachteil erscheinen, bietet aber letztlich die größte Kontrolle, da laufende Prozesse kontrolliert beendet werden können. | ||
source#1=Programmierung II - Uni Passau | ||
source#2="https://stackoverflow.com/questions/13360430/jframe-dispose-vs-system-exit" |
Empty file.
3 changes: 3 additions & 0 deletions
3
src/main/resources/de/jsilbereisen/perfumator/i18n/perfumes/parameterizedTest_de.properties
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name=Parametrisierte Tests | ||
description=Tests können mit der Annotation \"org.junit.jupiter.params.ParameterizedTest\" versehen werden. Solche parametrisierten Tests machen den getesteten Code wiederverwendbar. Sie sind dem Schreiben mehrerer Tests, die im Wesentlichen das gleiche Logik mit unterschiedlichen Werten testen, vorzuziehen. | ||
source#1="https://rules.sonarsource.com/java/RSPEC-5976/" |
Empty file.
4 changes: 4 additions & 0 deletions
4
src/main/resources/de/jsilbereisen/perfumator/i18n/perfumes/swingTimer_de.properties
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name=Swing Timer | ||
description=Der Timer aus der \"javax.swing\" Bibliothek vereinfacht die Aktualisierung von Benutzeroberflächen erheblich. Der Konstruktor verlangt ein Zeitintervall (in Millisekunden) und eine Implementierung des \"java.awt.event.ActionListener\"-Interfaces. Der Code des ActionListeners (z.B. GUI-Aktualisierungen) wird in dem Zeitintervall ausgeführt, das durch den ersten Parameter des Timers definiert ist. Der Timer führt den Code immer im Event-Dispatch-Thread aus. | ||
source#1=Programmierung II - Uni Passau | ||
source#2=https://docs.oracle.com/javase/8/docs/api/javax/swing/Timer.html |
Empty file.
4 changes: 4 additions & 0 deletions
4
src/main/resources/de/jsilbereisen/perfumator/i18n/perfumes/threadSafeSwing_de.properties
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name=Thread-safe Swing | ||
description=Java Swing-Anwendungen verwenden den Event Dispatch Thread. Dieser Thread muss die Initialisierung und die Aktualisierungsoperationen der GUI-Komponenten sowie Event-Handling übernehmen. Der Programmierer ist dafür verantwortlich, dass die GUI-Komponenten im Event Dispatch Thread erstellt und aktualisiert werden. Das kann dadurch erreicht werden, indem der entsprechende Code in einem \"Runnable\" platziert wird, die wir als Argument entweder an die Methode \"SwingUtilities.invokeLater\" oder \"SwingUtilities.invokeAndWait\" übergeben. | ||
source#1=Programmierung II - Uni Passau | ||
source#2=https://docs.oracle.com/javase/tutorial/uiswing/concurrency/dispatch.html |