@Test void fromStringShouldThrowOnInvalidValue() { assertThatThrownBy(() -> CassandraConsistenciesConfiguration.fromString("INVALID")) .isInstanceOf(IllegalArgumentException.class); }
public static ConsistencyLevel fromString(String value) { switch (value) { case "QUORUM": return ConsistencyLevel.QUORUM; case "LOCAL_QUORUM": return ConsistencyLevel.LOCAL_QUORUM; case "EACH_QUORUM": return ConsistencyLevel.EACH_QUORUM; case "SERIAL": return ConsistencyLevel.SERIAL; case "LOCAL_SERIAL": return ConsistencyLevel.LOCAL_SERIAL; } throw new IllegalArgumentException("'" + value + "' is not a value ConsistencyLevel"); }
CassandraConsistenciesConfiguration { public static ConsistencyLevel fromString(String value) { switch (value) { case "QUORUM": return ConsistencyLevel.QUORUM; case "LOCAL_QUORUM": return ConsistencyLevel.LOCAL_QUORUM; case "EACH_QUORUM": return ConsistencyLevel.EACH_QUORUM; case "SERIAL": return ConsistencyLevel.SERIAL; case "LOCAL_SERIAL": return ConsistencyLevel.LOCAL_SERIAL; } throw new IllegalArgumentException("'" + value + "' is not a value ConsistencyLevel"); } }
CassandraConsistenciesConfiguration { public static ConsistencyLevel fromString(String value) { switch (value) { case "QUORUM": return ConsistencyLevel.QUORUM; case "LOCAL_QUORUM": return ConsistencyLevel.LOCAL_QUORUM; case "EACH_QUORUM": return ConsistencyLevel.EACH_QUORUM; case "SERIAL": return ConsistencyLevel.SERIAL; case "LOCAL_SERIAL": return ConsistencyLevel.LOCAL_SERIAL; } throw new IllegalArgumentException("'" + value + "' is not a value ConsistencyLevel"); } private  CassandraConsistenciesConfiguration(ConsistencyLevel regular,
                                                ConsistencyLevel lightweightTransaction); }
CassandraConsistenciesConfiguration { public static ConsistencyLevel fromString(String value) { switch (value) { case "QUORUM": return ConsistencyLevel.QUORUM; case "LOCAL_QUORUM": return ConsistencyLevel.LOCAL_QUORUM; case "EACH_QUORUM": return ConsistencyLevel.EACH_QUORUM; case "SERIAL": return ConsistencyLevel.SERIAL; case "LOCAL_SERIAL": return ConsistencyLevel.LOCAL_SERIAL; } throw new IllegalArgumentException("'" + value + "' is not a value ConsistencyLevel"); } private  CassandraConsistenciesConfiguration(ConsistencyLevel regular,
                                                ConsistencyLevel lightweightTransaction); static ConsistencyLevel fromString(String value); static CassandraConsistenciesConfiguration fromConfiguration(CassandraConfiguration configuration); ConsistencyLevel getRegular(); ConsistencyLevel getLightweightTransaction(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString(); }
CassandraConsistenciesConfiguration { public static ConsistencyLevel fromString(String value) { switch (value) { case "QUORUM": return ConsistencyLevel.QUORUM; case "LOCAL_QUORUM": return ConsistencyLevel.LOCAL_QUORUM; case "EACH_QUORUM": return ConsistencyLevel.EACH_QUORUM; case "SERIAL": return ConsistencyLevel.SERIAL; case "LOCAL_SERIAL": return ConsistencyLevel.LOCAL_SERIAL; } throw new IllegalArgumentException("'" + value + "' is not a value ConsistencyLevel"); } private  CassandraConsistenciesConfiguration(ConsistencyLevel regular,
                                                ConsistencyLevel lightweightTransaction); static ConsistencyLevel fromString(String value); static CassandraConsistenciesConfiguration fromConfiguration(CassandraConfiguration configuration); ConsistencyLevel getRegular(); ConsistencyLevel getLightweightTransaction(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString(); static final CassandraConsistenciesConfiguration DEFAULT; }