Example #1
0
        public void GoodConnectionName_ReturnsExpectedValue()
        {
            // arrange
            var repo     = MakeRepo();
            var key      = "TestConnectionString";
            var expected = "Sample Connection String";

            // act
            ConfigurationRepositoryImpl.SetConnecitonString("TestConnectionString", "Sample Connection String");
            var test = repo.GetConnectionString(key);

            ConfigurationRepositoryImpl.ResetConnectionStrings();
            // assert
            test.Should()
            .Be(expected);
        }
Example #2
0
        public void GoodKey_ReturnsExpectedValue()
        {
            // arrange
            var repo     = MakeRepo();
            var key      = "TestAppSetting";
            var expected = "Sample App Setting";

            // act
            ConfigurationRepositoryImpl.SetValue("TestAppSetting", "Sample App Setting");
            var test = repo.GetValue(key, null);

            ConfigurationRepositoryImpl.ResetValues();
            // assert
            test.Should()
            .Be(expected);
        }