use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ThriftSerializerTest method testGetSerializer6.
public void testGetSerializer6() {
try {
SerializerDefinition def = new SerializerDefinition("thrift", "java=" + MockMessage.class.getName() + ",protocol=bongus");
new DefaultSerializerFactory().getSerializer(def);
} catch (IllegalArgumentException e) {
return;
}
fail("IllegalArgumentException should have been thrown for bogus Thrift protocol");
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ThriftSerializerTest method testGetSerializer5.
public void testGetSerializer5() {
try {
SerializerDefinition def = new SerializerDefinition("thrift", "java=com.abc.FooBar,protocol=simple-json");
new DefaultSerializerFactory().getSerializer(def);
} catch (IllegalArgumentException e) {
return;
}
fail("IllegalArgumentException should have been thrown for non-existing Thrift class");
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ThriftSerializerTest method testGetSerializer7.
public void testGetSerializer7() {
try {
SerializerDefinition def = new SerializerDefinition("thrift", "php=FooBar,protocol=bongus");
new DefaultSerializerFactory().getSerializer(def);
} catch (IllegalArgumentException e) {
return;
}
fail("IllegalArgumentException should have been thrown for non-Java Thrift client");
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ThriftSerializerTest method testGetSerializer4.
public void testGetSerializer4() {
try {
SerializerDefinition def = new SerializerDefinition("thrift", "");
new DefaultSerializerFactory().getSerializer(def);
} catch (IllegalArgumentException e) {
return;
}
fail("IllegalArgumentException should have been thrown for missing Thrift class and protocol");
}
use of voldemort.serialization.SerializerDefinition in project voldemort by voldemort.
the class ThriftSerializerTest method testGetSerializer1.
public void testGetSerializer1() {
SerializerDefinition def = new SerializerDefinition("thrift", "java=" + MockMessage.class.getName() + ",protocol=BiNary");
Serializer<?> serializer = new DefaultSerializerFactory().getSerializer(def);
assertEquals(ThriftSerializer.class, serializer.getClass());
}
Aggregations