Skip to content

Commit dd9da8c

Browse files
kwoykepivovarit
authored andcommitted
BAEL-3693: Rename test methods (eugenp#8482)
1 parent 3b3880a commit dd9da8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core-java-modules/core-java-lang-operators/src/test/java/com/baeldung/ternaryoperator/TernaryOperatorUnitTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
public class TernaryOperatorUnitTest {
77

88
@Test
9-
public void givenACondition_whenUsingTernaryOperator_thenItEvaluatesConditionAndReturnsAValue() {
9+
public void whenUsingTernaryOperator_thenConditionIsEvaluatedAndValueReturned() {
1010
int number = 10;
1111
String msg = number > 10 ? "Number is greater than 10" : "Number is less than or equal to 10";
1212

1313
assertThat(msg).isEqualTo("Number is less than or equal to 10");
1414
}
1515

1616
@Test
17-
public void givenATrueCondition_whenUsingTernaryOperator_thenOnlyExpression1IsEvaluated() {
17+
public void whenConditionIsTrue_thenOnlyFirstExpressionIsEvaluated() {
1818
int exp1 = 0, exp2 = 0;
1919
int result = 12 > 10 ? ++exp1 : ++exp2;
2020

@@ -24,7 +24,7 @@ public void givenATrueCondition_whenUsingTernaryOperator_thenOnlyExpression1IsEv
2424
}
2525

2626
@Test
27-
public void givenAFalseCondition_whenUsingTernaryOperator_thenOnlyExpression2IsEvaluated() {
27+
public void whenConditionIsFalse_thenOnlySecondExpressionIsEvaluated() {
2828
int exp1 = 0, exp2 = 0;
2929
int result = 8 > 10 ? ++exp1 : ++exp2;
3030

0 commit comments

Comments
 (0)