public void SetsValueCorrectly()
            {
                var configurationService = new ConfigurationService();
 
                configurationService.SetValue("myKey", "myValue");

                Assert.AreEqual("myValue", configurationService.GetValue<string>("myKey"));
            }
            public void ReturnsExistingValue()
            {
                var configurationService = new ConfigurationService();

                configurationService.SetValue("myKey", "myValue");

                Assert.AreEqual("myValue", configurationService.GetValue<string>("myKey"));
            }
            public void IsInvokedDuringSetValueMethod()
            {
                var configurationService = new ConfigurationService();

                bool invoked = false;
                configurationService.ConfigurationChanged += (sender, e) => invoked = true;

                configurationService.SetValue("key", "value");

                Assert.IsTrue(invoked);
            }
            public void ThrowsArgumentExceptionForEmptyKey()
            {
                var configurationService = new ConfigurationService();

                ExceptionTester.CallMethodAndExpectException<ArgumentException>(() => configurationService.SetValue(string.Empty, "value"));
            }
            public void ReturnsDefaultValueForNonExistingValue()
            {
                var configurationService = new ConfigurationService();

                Assert.AreEqual("nonExistingValue", configurationService.GetValue("nonExistingKey", "nonExistingValue"));
            }
            public void ThrowsArgumentExceptionForNullKey()
            {
                var configurationService = new ConfigurationService();

                ExceptionTester.CallMethodAndExpectException<ArgumentException>(() => configurationService.GetValue<string>(null));
            }