Пример #1
0
        public async Task ItCanTurnMotor()
        {
            var comm       = new BluetoothCommunication("COM4");
            var controller = new BrickController(comm);

            controller.Connect();

            await controller.TurnMotorAsync(OutputPort.C, 50, 1);
        }
Пример #2
0
        public async Task ItCanTurnMotor()
        {
            var comm       = new MockCommunication();
            var controller = new BrickController(comm);
            await controller.Connect();

            await controller.TurnMotorAsync(OutputPort.A, 50, 1);

            Assert.AreEqual(2, comm.ReceivedData.Count);
        }