]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/test/java/org/rocksdb/CompactionStopStyleTest.java
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / java / src / test / java / org / rocksdb / CompactionStopStyleTest.java
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).
5
6 package org.rocksdb;
7
8 import org.junit.Test;
9
10 import static org.assertj.core.api.Assertions.assertThat;
11
12 public class CompactionStopStyleTest {
13
14 @Test(expected = IllegalArgumentException.class)
15 public void failIfIllegalByteValueProvided() {
16 CompactionStopStyle.getCompactionStopStyle((byte) -1);
17 }
18
19 @Test
20 public void getCompactionStopStyle() {
21 assertThat(CompactionStopStyle.getCompactionStopStyle(
22 CompactionStopStyle.CompactionStopStyleTotalSize.getValue()))
23 .isEqualTo(CompactionStopStyle.CompactionStopStyleTotalSize);
24 }
25
26 @Test
27 public void valueOf() {
28 assertThat(CompactionStopStyle.valueOf("CompactionStopStyleSimilarSize")).
29 isEqualTo(CompactionStopStyle.CompactionStopStyleSimilarSize);
30 }
31 }