use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.Status in project ozone by apache.
the class TestResultCodes method codeMapping.
@Test
public void codeMapping() {
Assert.assertEquals(ResultCodes.values().length, Status.values().length);
for (int i = 0; i < ResultCodes.values().length; i++) {
ResultCodes codeValue = ResultCodes.values()[i];
Status protoBufValue = Status.values()[i];
Assert.assertTrue(String.format("Protobuf/Enum constant name mismatch %s %s", codeValue, protoBufValue), sameName(codeValue.name(), protoBufValue.name()));
ResultCodes converted = ResultCodes.values()[protoBufValue.ordinal()];
Assert.assertEquals(codeValue, converted);
}
}
Aggregations