예제 #1
0
        public void TestGetAllInputChannelsWithoutDevice()
        {
            var reader = new GUITagReader();
            var result = reader.GetAllInputChannels(null);

            Assert.IsNull(result);
        }
예제 #2
0
        public void TestGetAllInputChannelsWhereNoneExists()
        {
            var reader = new GUITagReader();
            var result = reader.GetAllInputChannels(new ConnectedDevice());

            Assert.AreEqual(0, result.Count);
        }
예제 #3
0
        public void TestGetAllInputChannels()
        {
            var device = new ConnectedDevice
            {
                Channels = new List <Channel>
                {
                    new Channel("ai"),
                    new Channel("di"),
                    new Channel("do"),
                    new Channel("relay"),
                    new Channel("ao"),
                    new Channel("dwqdqw"),
                    new Channel("2212112")
                }
            };

            var reader = new GUITagReader();
            var result = reader.GetAllInputChannels(device);

            Assert.AreEqual(3, result.Count);
        }