use of org.opendaylight.openflowplugin.impl.translator.TranslatorKeyFactory in project openflowplugin by opendaylight.
the class TranslatorLibratyUtilTest method setBasicTranslatorLibraryTest.
@Test
public void setBasicTranslatorLibraryTest() {
final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
TranslatorLibraryUtil.injectBasicTranslatorLibrary(translatorLibrarian, convertorManager);
TranslatorLibrary translatorLibrary = translatorLibrarian.oook();
TranslatorKeyFactory of13TranslatorKeyFactory = new TranslatorKeyFactory(OFP_VERSION_1_3);
MessageTranslator<Object, Object> translator;
translator = translatorLibrary.lookupTranslator(of13TranslatorKeyFactory.createTranslatorKey(PacketIn.class));
assertNotNull(translator);
translator = translatorLibrary.lookupTranslator(of13TranslatorKeyFactory.createTranslatorKey(PortGrouping.class));
assertNotNull(translator);
translator = translatorLibrary.lookupTranslator(of13TranslatorKeyFactory.createTranslatorKey(MultipartReplyAggregateCase.class));
assertNotNull(translator);
TranslatorKeyFactory of10TranslatorKeyFactory = new TranslatorKeyFactory(OFP_VERSION_1_0);
translator = translatorLibrary.lookupTranslator(of10TranslatorKeyFactory.createTranslatorKey(PacketIn.class));
assertNotNull(translator);
translator = translatorLibrary.lookupTranslator(of10TranslatorKeyFactory.createTranslatorKey(PortGrouping.class));
assertNotNull(translator);
translator = translatorLibrary.lookupTranslator(of10TranslatorKeyFactory.createTranslatorKey(MultipartReplyAggregateCase.class));
assertNotNull(translator);
}
Aggregations