public void TestAddMapType() { var typeOne = new Dictionary <String, Object>(); typeOne.Put("f1", typeof(int)); var typeTwo = new Dictionary <String, Object>(); typeTwo.Put("f2", typeof(int)); var callables = new Callable[2]; for (var i = 0; i < callables.Length; i++) { var index = i; callables[i] = () => { try { if (index == 0) { return(_service.AddNestableMapType("A", typeOne, null, true, true, true, false, false)); } else { return(_service.AddNestableMapType("A", typeTwo, null, true, true, true, false, false)); } } catch (EventAdapterException ex) { return(ex); } }; } // the result should be one exception and one type var results = TryMT(callables); EPAssertionUtil.AssertTypeEqualsAnyOrder(new Type[] { typeof(EventAdapterException), typeof(MapEventType) }, results); }
public void TestAddBeanType() { var typeOne = new Dictionary <String, Type>(); typeOne.Put("f1", typeof(int)); var callables = new Callable[2]; for (var i = 0; i < callables.Length; i++) { var index = i; callables[i] = () => { try { if (index == 0) { return(_service.AddBeanType("X", typeof(SupportBean_S1), true, true, true)); } else { return(_service.AddBeanType("X", typeof(SupportBean_S0), true, true, true)); } } catch (EventAdapterException ex) { return(ex); } }; } // the result should be one exception and one type var results = TryMT(callables); EPAssertionUtil.AssertTypeEqualsAnyOrder( new Type[] { typeof(EventAdapterException), typeof(BeanEventType) }, results); }