Exemple #1
0
        public void Call_get_root_property_method()
        {
            _store.Write("rootKey", "rootValue");

            string value = _config.Get("rootKey");

            Assert.Equal("rootValue", "rootValue");
        }
Exemple #2
0
        public void Read_both_usernames()
        {
            _store.Write("Admin.Username", "u1");
            _store.Write("Normal.Username", "u2");

            string u1 = _config.Admin?.Username;
            string u2 = _config.Normal?.Username;

            Assert.Equal("u1", u1);
            Assert.Equal("u2", u2);
        }
Exemple #3
0
        protected override IConfigStore CreateStore()
        {
            var result = new DictionaryConfigStore();

            result.Write("Numbers", "1 2 3");
            result.Write("Creds[0].Username", "user1");
            result.Write("Creds[0].Password", "pass1");
            result.Write("Creds[1].Username", "user2");
            result.Write("Creds[1].Password", "pass2");
            result.Write("Creds.$l", "2");
            return(result);
        }