public void GetSender_ReturnsSingleInstance()
        {
            // Arrange
            ILogger logger = CommonServices.GetLogger();

            // Act
            IWebHookSender actual1 = CustomServices.GetSender(logger);
            IWebHookSender actual2 = CustomServices.GetSender(logger);

            // Assert
            Assert.Same(actual1, actual2);
        }
        public void SetSender_GetSender_Roundtrips()
        {
            // Arrange
            ILogger logger = CommonServices.GetLogger();
            Mock <IWebHookSender> senderMock = new Mock <IWebHookSender>();

            // Act
            CustomServices.SetSender(senderMock.Object);
            IWebHookSender actual = CustomServices.GetSender(logger);

            // Assert
            Assert.Same(senderMock.Object, actual);
        }
        public void GetReceiverManager_ReturnsSingleInstance()
        {
            // Arrange
            ILogger logger = CommonServices.GetLogger();
            List <IWebHookReceiver> receivers = new List <IWebHookReceiver>();

            // Act
            IWebHookReceiverManager actual1 = ReceiverServices.GetReceiverManager(receivers, logger);
            IWebHookReceiverManager actual2 = ReceiverServices.GetReceiverManager(receivers, logger);

            // Assert
            Assert.Same(actual1, actual2);
        }
        public void GetReceiverConfig_ReturnsSingleInstance()
        {
            // Arrange
            SettingsDictionary settings = CommonServices.GetSettings();
            ILogger            logger   = CommonServices.GetLogger();

            // Act
            IWebHookReceiverConfig actual1 = ReceiverServices.GetReceiverConfig(settings, logger);
            IWebHookReceiverConfig actual2 = ReceiverServices.GetReceiverConfig(settings, logger);

            // Assert
            Assert.Same(actual1, actual2);
        }
        public void SetReceiverConfig_GetReceiverConfig_Roundtrips()
        {
            // Arrange
            SettingsDictionary            settings   = CommonServices.GetSettings();
            ILogger                       logger     = CommonServices.GetLogger();
            Mock <IWebHookReceiverConfig> configMock = new Mock <IWebHookReceiverConfig>();

            // Act
            ReceiverServices.SetReceiverConfig(configMock.Object);
            IWebHookReceiverConfig actual = ReceiverServices.GetReceiverConfig(settings, logger);

            // Assert
            Assert.Same(configMock.Object, actual);
        }