示例#1
0
        public void ReadDoesNotReturnParameterlessConstructorObject()
        {
            var parameters = new[] {
                new ReadParameter("Addr0", typeof(ParameterLessConstructorObject))
            };

            Assert.Throws <Exception>(() => _ioDevice.Read(parameters));
        }
示例#2
0
        public void ReadReturnsNewObject()
        {
            var parameters = new []
            {
                new ReadParameter("Addr0", typeof(object))
            };
            var result = _ioDevice.Read(parameters);

            Assert.AreEqual(1, result.Length);
            Assert.AreEqual(typeof(object), result[0].GetType());
        }