public void NotificationTrayIcon_ObserverIdTest()
        {
            // Arrange
            var mockContextMenu = new Mock<ITradePriceMonitorContextMenu>();
            var target = new NotificationTrayIcon(mockContextMenu.Object);

            //Act
            var observerId = target.ObserverId;

            //Assert
            Assert.IsNotNull(observerId);
            Assert.IsTrue(observerId.ToString().Length >= 32);
        }
        public void NotificationTrayIcon_UpdateTest()
        {
            // Arrange
            var mockContextMenu = new Mock<ITradePriceMonitorContextMenu>();
            var target = new NotificationTrayIcon(mockContextMenu.Object);
            var originalIcon = ((NotifyIcon)GetInstanceField(typeof (NotificationTrayIcon), target, "_notifyIcon")).Icon;//((NotifyIcon) targetPrivateObj.GetFieldOrProperty("_notifyIcon", BindingFlags.GetField)).Icon;

            // Act
            target.Update(new TradePrice(2.5, Currency.GBP));
            var iconAfterUpdate = ((NotifyIcon)GetInstanceField(typeof(NotificationTrayIcon), target, "_notifyIcon")).Icon;//((NotifyIcon) targetPrivateObj.GetFieldOrProperty("_notifyIcon",BindingFlags.GetField)).Icon;

            // Assert
            Assert.IsFalse(CompareIcons(originalIcon, iconAfterUpdate));
        }
        public void NotificationTrayIcon_CloseTest()
        {
            // Arrange
            var mockContextMenu = new Mock<ITradePriceMonitorContextMenu>();
            var target = new NotificationTrayIcon(mockContextMenu.Object);
            var originalIconVisibility = ((NotifyIcon) GetInstanceField(typeof (NotificationTrayIcon), target, "_notifyIcon")).Visible;

            // Act
            target.Close();
            var iconVisibilityAfterUpdate = ((NotifyIcon)GetInstanceField(typeof(NotificationTrayIcon), target, "_notifyIcon")).Visible;//((NotifyIcon) targetPrivateObj.GetFieldOrProperty("_notifyIcon",BindingFlags.GetField)).Icon;
            
            // Assert
            Assert.IsTrue(originalIconVisibility);
            Assert.IsFalse(iconVisibilityAfterUpdate);
        }