Revize 8694e970
Přidáno uživatelem Petr Urban před téměř 3 roky(ů)
src/main/webapp/WEB-INF/templates/configuration.html | ||
---|---|---|
56 | 56 |
class="form-control is-invalid" th:id="${threshold.value.name}" |
57 | 57 |
name="thresholdValues"> |
58 | 58 |
<input th:unless="${threshold.value.isErrorMessageShown}" |
59 |
th:value="${configurations.get(antiPattern.name).get(threshold.value.name)}"
|
|
59 |
th:value="${#strings.replace(configurations.get(antiPattern.name).get(threshold.value.name), 'f', '')}"
|
|
60 | 60 |
class="form-control" th:id="${threshold.value.name}" |
61 | 61 |
name="thresholdValues"> |
62 | 62 |
<input th:value="${threshold.value.name}" style="display: none" class="form-control" |
src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/types/PercentageTest.java | ||
---|---|---|
1 |
package cz.zcu.fav.kiv.antipatterndetectionapp.model.types; |
|
2 |
|
|
3 |
import org.junit.jupiter.api.BeforeAll; |
|
4 |
import org.junit.jupiter.api.Test; |
|
5 |
|
|
6 |
import static org.junit.jupiter.api.Assertions.*; |
|
7 |
|
|
8 |
class PercentageTest { |
|
9 |
Percentage percentage; |
|
10 |
|
|
11 |
@Test |
|
12 |
void testReturnValue() { |
|
13 |
float inputValue = 50f; |
|
14 |
|
|
15 |
percentage = new Percentage(inputValue); |
|
16 |
assertEquals(0.6, percentage.getValue()); |
|
17 |
} |
|
18 |
|
|
19 |
} |
src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/types/PositiveFloatTest.java | ||
---|---|---|
1 |
package cz.zcu.fav.kiv.antipatterndetectionapp.model.types; |
|
2 |
|
|
3 |
import static org.junit.jupiter.api.Assertions.*; |
|
4 |
|
|
5 |
class PositiveFloatTest { |
|
6 |
|
|
7 |
} |
src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/types/PositiveIntegerTest.java | ||
---|---|---|
1 |
package cz.zcu.fav.kiv.antipatterndetectionapp.model.types; |
|
2 |
|
|
3 |
import static org.junit.jupiter.api.Assertions.*; |
|
4 |
|
|
5 |
class PositiveIntegerTest { |
|
6 |
|
|
7 |
} |
Také k dispozici: Unified diff
#10 prepared Unit tests for model.types (yet) - more unit tests will be added and implemented! REPAIRED "f" for float number on "Configuration" page in some inputs.