Removed CHMUseCases tests which make little sense with new contexts

This commit is contained in:
leventov
2015-01-25 08:58:52 +07:00
parent f1cadde18f
commit 32ee88b4d7
@@ -656,28 +656,6 @@ public class CHMUseCasesTest {
}
}
@Test
public void testGetUsingWithCharSequenceNoValue() throws IOException {
ChronicleMapBuilder<CharSequence, CharSequence> builder = ChronicleMapBuilder
.of(CharSequence.class, CharSequence.class);
if (typeOfMap == TypeOfMap.STATELESS)
return; // context supported by the STATELESS client
try (ChronicleMap<CharSequence, CharSequence> map = newInstance(builder)) {
try (MapKeyContext<CharSequence, CharSequence> c = map.context("1")) {
CharSequence value = c.get();
assertTrue(value instanceof StringBuilder);
((StringBuilder) value).append("Hello World");
}
assertEquals(null, map.get("1"));
mapChecks();
}
}
@Test
public void testGetUsingWithIntValueNoValue() throws IOException {
@@ -699,32 +677,6 @@ public class CHMUseCasesTest {
}
}
@Test(expected = IllegalStateException.class)
public void testAcquireUsingWithIntValueNoValue() throws IOException {
if (typeOfMap == TypeOfMap.STATELESS)
throw new IllegalStateException(); // acquireContext supported by the STATELESS
ChronicleMapBuilder<CharSequence, IntValue> builder = ChronicleMapBuilder
.of(CharSequence.class, IntValue.class);
try (ChronicleMap<CharSequence, IntValue> map = newInstance(builder)) {
try (MapKeyContext<CharSequence, IntValue> c = map.context("1")) {
c.updateLock().lock();
IntValue value = c.get();
assertTrue(value instanceof IntValue);
value.setValue(1);
}
assertEquals(null, map.get("1"));
mapChecks();
}
}
@Test(expected = IllegalArgumentException.class)
public void testAcquireUsingImmutableUsing() throws IOException {