Пример #1
0
        public void TryPostUnknownType()
        {
            var p = new Port<int> ();
            int tmp;

            Assert.IsTrue (p.TryPostUnknownType (10), "#1");
            Assert.AreEqual (1, p.ItemCount, "#2");
            Assert.IsTrue (p.TryPostUnknownType (20), "#3");
            Assert.AreEqual (2, p.ItemCount, "#4");
            Assert.IsFalse (p.TryPostUnknownType ("oi"), "#5");
            Assert.AreEqual (2, p.ItemCount, "#6");
            try {
                p.TryPostUnknownType (null);
                Assert.Fail ("#7");
            } catch (NullReferenceException ex) {} /*LAMEDOCS LAMEIMPL*/
        }