private void SendClosestIdsChangedMessage()
        {
            var message = new ClosestIdsChangedMessage
            {
                ClosestPointIds = ClosestIds.ToArray()
            };

            m_Bus.PublishAsync(message);
        }
示例#2
0
        public void ClosestIdsChangeHandler_DoesNotifyPropertyChangedForPropertyX_ForMessage()
        {
            // Arrange
            var test = new TestNotifyPropertyChanged(m_Sut,
                                                     "ClosestPointIds");

            var message = new ClosestIdsChangedMessage
            {
                ClosestPointIds = new int[0]
            };

            // Act
            m_Sut.ClosestIdsChangeHandler(message);

            // Assert
            Assert.True(test.IsExpectedNotified);
        }
示例#3
0
        public void ClosestIdsChangeHandler_SetsClosestIds_ForMessage()
        {
            // Arrange
            var expected = new[]
            {
                1,
                2,
                3
            };

            var message = new ClosestIdsChangedMessage
            {
                ClosestPointIds = expected
            };

            // Act
            m_Sut.ClosestIdsChangeHandler(message);

            // Assert
            Assert.True(expected.SequenceEqual(m_Sut.ClosestPointIds));
        }
示例#4
0
        internal void ClosestIdsChangeHandler(ClosestIdsChangedMessage message)
        {
            ClosestPointIds = message.ClosestPointIds;

            Update();
        }