Exemplo n.º 1
0
        public void KeypadAndIndicationCreateTest()
        {
            IDeviceManagerFormOutput deviceManagerForm = new ExternalDevicesController(_externalDevice);

            deviceManagerForm.AddKeypadAndIndication(1, 1);

            Assert.IsNotNull(deviceManagerForm);
        }
Exemplo n.º 2
0
        public void OscillographCreateTest()
        {
            IDeviceManagerFormOutput deviceManagerForm = new ExternalDevicesController(_externalDevice);

            deviceManagerForm.AddOscillograph();

            Assert.IsNotNull(deviceManagerForm);
        }
Exemplo n.º 3
0
        public void KeypadAndIndicationControllerCreateTest()
        {
            IDeviceOutput  deviceOutput   = new ExternalDevicesController(_externalDevice);
            DevicesFactory devicesFactory = new DevicesFactory(deviceOutput);

            IDeviceInput keypadAndIndicationController = devicesFactory.GetKeypadAndIndication(1, 1);

            Assert.IsInstanceOfType(keypadAndIndicationController, typeof(KeypadAndIndicationController));
        }
Exemplo n.º 4
0
        public void OscillographControllerCreateTest()
        {
            IDeviceOutput  deviceOutput   = new ExternalDevicesController(_externalDevice);
            DevicesFactory devicesFactory = new DevicesFactory(deviceOutput);

            IDeviceInput oscillographController = devicesFactory.GetOscillograph();

            Assert.IsInstanceOfType(oscillographController, typeof(OscillographController));
        }
Exemplo n.º 5
0
        public void DisplayAddressTest()
        {
            IDeviceOutput            deviceOutput = new ExternalDevicesController(_externalDevice);
            List <DisplayController> displays     = new List <DisplayController>();

            for (int i = 0x0; i < 0x8; i++)
            {
                displays.Add(new DisplayController(deviceOutput, i));
            }

            foreach (var d in displays)
            {
                Assert.IsInstanceOfType(d, typeof(DisplayController));
            }
        }
Exemplo n.º 6
0
        public void KeypadAndIndicationSetAndGetMemoryTest()
        {
            IDeviceOutput  deviceOutput   = new ExternalDevicesController(_externalDevice);
            DevicesFactory devicesFactory = new DevicesFactory(deviceOutput);


            int[]            mas = { 0x10, 0x12, 0x13 };
            ExtendedBitArray extendedBitArray = new ExtendedBitArray(1);
            IDeviceInput     keypadAndIndicationController = devicesFactory.GetKeypadAndIndication(0x1, 1);

            foreach (var m in mas)
            {
                keypadAndIndicationController.SetMemory(extendedBitArray, m);
                Assert.AreEqual(extendedBitArray, keypadAndIndicationController.GetMemory(m));
            }
        }
Exemplo n.º 7
0
        public void KeypadAndIndicationAddressAndIrqTest()
        {
            IDeviceOutput deviceOutput = new ExternalDevicesController(_externalDevice);
            List <KeypadAndIndicationController> keypadAndIndications = new List <KeypadAndIndicationController>();

            for (int i = 0x0; i < 0x8; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    keypadAndIndications.Add(new KeypadAndIndicationController(deviceOutput, i, j));
                }
            }

            foreach (var KaI in keypadAndIndications)
            {
                Assert.IsInstanceOfType(KaI, typeof(KeypadAndIndicationController));
            }
        }