Skip to content

Commit

Permalink
test(protocol): remove redundant test case
Browse files Browse the repository at this point in the history
This test case is no longer needed. From now on, the ZbColumnFamilies
values must remain the same over time (we have hardcoded them) and must
be unique (there is another test case that checks this). But there is no
need anymore for the values to match exactly the ordinals.
  • Loading branch information
korthout committed Jan 26, 2024
1 parent 9118269 commit 759d3b0
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,10 @@
import java.util.Arrays;
import java.util.stream.Stream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

class ZbColumnFamiliesTest {

/**
* This is just a temporary test to ensure that the enum values are not reordered, when we
* re-implment the getValue() method.
*/
@ParameterizedTest
@MethodSource("values")
void shouldReturnOrdinalForEnumValue(final ZbColumnFamilies columnFamily) {
assertThat(columnFamily.getValue()).isEqualTo(columnFamily.ordinal());
}

@Test
void shouldNotReuseEnumValues() {
assertThat(Arrays.stream(ZbColumnFamilies.values()).map(ZbColumnFamilies::getValue))
Expand Down

0 comments on commit 759d3b0

Please sign in to comment.