コード例 #1
0
        public virtual void SendLedAnimationCommand(ILedAnimation ledAnimatoin)
        {
            int    freq    = FloatToInt32Converter.Convert(ledAnimatoin.FrequencyInHz);
            string message = string.Format("{0},{1},{2}", (int)ledAnimatoin.Animation, freq, ledAnimatoin.DurationInSeconds);
            string command = CommandFormatter.CreateCommand(LedCommand, message);

            CommandQueue.Enqueue(command);
        }
コード例 #2
0
        private void VerifyFloatConvertsToInt32(float floatTestValue, int expectedInt)
        {
            var result = _target.Convert(floatTestValue);

            result.Should().Be(expectedInt);
        }