Consume() public method

public Consume ( IPortElement item ) : void
item IPortElement
return void
Beispiel #1
0
        public void Consume()
        {
            Type[] types = new Type[] { typeof (int), typeof (string) };
            IPortReceive[] ports = new IPortReceive[] { new Port<int>(), new Port<string> () };
            int count = 1;
            Handler<ICollection[]> handler = (cols) => {};
            var mig = new MultipleItemGather (types, ports, count, handler);

            try {
                mig.Consume (new PortElement<int> (10));
                Assert.Fail ("#1");
            } catch (InvalidOperationException) {}
        }