Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            ICameraServiceClient      cameraServiceClient      = new CameraServiceClient();
            IPowerSupplyServiceClient powerSupplyServiceClient = new PowerSupplyServiceClient();

            var camera = ConnectToCamera(cameraServiceClient);

            var powerSupply = PowerSupplyDevice(powerSupplyServiceClient);

            StartStreaming(cameraServiceClient);

            PowerConsumptionTest(camera, powerSupply);
        }
        public void SetUp()
        {
            _powerSupplyServiceClient = new PowerSupplyServiceClient();

            _powerSupplyServiceClientMock.Setup(p => p.GetPowerSupplyDevices()).Returns(new List <PowerSupplyDevice>
            {
                new PowerSupplyDevice {
                    ComPort = "COM1", Voltage = 5.5, Current = 9.98
                },
                new PowerSupplyDevice {
                    ComPort = "COM2", Voltage = 6.5, Current = 4.68
                },
                new PowerSupplyDevice {
                    ComPort = "COM3", Voltage = 15.5, Current = 9.58
                }
            });
        }