public void Accept(NotifyActionOperation operation)
 {
 }
 void IOperationAcceptor.Accept(NotifyActionOperation operation)
 {
 }
        public void When_reading_notify_action_operation_it_must_be_correct()
        {
            // Arrange
            byte[] buffer =
            {
                2,
                ByteFor('5'),
                ByteFor('3'),
                ByteFor('\t'),
                ByteFor('0'),
                ByteFor('1'),
                ByteFor('5'),
                ByteFor(':'),
                ByteFor('A'),
                ByteFor('B'),
                ByteFor('C'),
                ByteFor('D'),
                ByteFor('E'),
                ByteFor('F'),
                ByteFor('\t'),
                ByteFor('0'),
                ByteFor('2'),
                ByteFor('4'),
                ByteFor(':'),
                ByteFor('6'),
                ByteFor('6'),
                ByteFor('\t'),
                ByteFor('0'),
                ByteFor('2'),
                ByteFor('5'),
                ByteFor(':'),
                ByteFor('4'),
                ByteFor('5'),
                ByteFor('7'),
                ByteFor('\t'),
                3
            };
            var reader = new PacketReader();

            // Act
            Operation operation = reader.Read(buffer);

            // Assert
            var expected = new NotifyActionOperation(new WirelessNetworkAddress("ABCDEF"))
            {
                InputKeys = RawDeviceKeys.Key2OrPassIntermediate | RawDeviceKeys.Key7,
                SensorTime = TimeSpan.FromMilliseconds(456.75)
            };
            operation.ShouldBeEquivalentTo(expected, options => options.IncludingAllRuntimeProperties());
        }
            public void Accept(NotifyActionOperation operation)
            {
                using (var lockTracker = new LockTracker(InnerLog, MethodBase.GetCurrentMethod()))
                {
                    lock (nonReentrantProcessIncomingOperationLock)
                    {
                        lockTracker.Acquired();

                        owner.HandleIncomingNotifyActionOperation(operation);
                    }
                }
            }
        public void When_writing_notify_action_operation_it_must_be_correct()
        {
            // Arrange
            var operation = new NotifyActionOperation(new WirelessNetworkAddress("ABCDEF"))
            {
                InputKeys = RawDeviceKeys.Key2OrPassIntermediate | RawDeviceKeys.Key7,
                SensorTime = TimeSpan.FromMilliseconds(456.75)
            };

            // Act
            byte[] buffer = PacketWriter.Write(operation, false);

            // Assert
            buffer.ShouldBeEquivalentTo(new byte[]
            {
                2,
                ByteFor('5'),
                ByteFor('3'),
                ByteFor('\t'),
                ByteFor('0'),
                ByteFor('1'),
                ByteFor('5'),
                ByteFor(':'),
                ByteFor('A'),
                ByteFor('B'),
                ByteFor('C'),
                ByteFor('D'),
                ByteFor('E'),
                ByteFor('F'),
                ByteFor('\t'),
                ByteFor('0'),
                ByteFor('2'),
                ByteFor('4'),
                ByteFor(':'),
                ByteFor('6'),
                ByteFor('6'),
                ByteFor('\t'),
                ByteFor('0'),
                ByteFor('2'),
                ByteFor('5'),
                ByteFor(':'),
                ByteFor('4'),
                ByteFor('5'),
                ByteFor('7'),
                ByteFor('\t'),
                3
            });
        }