-
Notifications
You must be signed in to change notification settings - Fork 59
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
Showing
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package edu.hm.hafner.util; | ||
|
||
public abstract class ACTest<T extends Comparable<T>> { | ||
void shouldBeNegativeIfThisIsSmaller() { | ||
T smaller = createSmallerSut(); | ||
Check notice Code scanning / CodeQL Unread local variable Note test
Variable 'T smaller' is never read.
|
||
T greater = createGreaterSut(); | ||
Check notice Code scanning / CodeQL Unread local variable Note test
Variable 'T greater' is never read.
|
||
} | ||
|
||
/** | ||
* Creates a subject under test. The SUT must be smaller than the SUT of the opposite method {@link | ||
* #createGreaterSut()}. | ||
* | ||
* @return the SUT | ||
*/ | ||
protected abstract T createSmallerSut(); | ||
|
||
/** | ||
* Creates a subject under test. The SUT must be greater than the SUT of the opposite method {@link | ||
* #createSmallerSut()}. | ||
* | ||
* @return the SUT | ||
*/ | ||
protected abstract T createGreaterSut(); | ||
} |