1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
10 import static org
.assertj
.core
.api
.Assertions
.assertThat
;
12 public class CompactionStopStyleTest
{
14 @Test(expected
= IllegalArgumentException
.class)
15 public void failIfIllegalByteValueProvided() {
16 CompactionStopStyle
.getCompactionStopStyle((byte) -1);
20 public void getCompactionStopStyle() {
21 assertThat(CompactionStopStyle
.getCompactionStopStyle(
22 CompactionStopStyle
.CompactionStopStyleTotalSize
.getValue()))
23 .isEqualTo(CompactionStopStyle
.CompactionStopStyleTotalSize
);
27 public void valueOf() {
28 assertThat(CompactionStopStyle
.valueOf("CompactionStopStyleSimilarSize")).
29 isEqualTo(CompactionStopStyle
.CompactionStopStyleSimilarSize
);