public void SetUp()
        {
            var document = new XmlDocument();
            document.LoadXml(xml.Trim().Replace("'", "\""));
            theFileName = "connectionStrings.config";
            document.Save(theFileName);

            var settings = MockRepository.GenerateMock<DeploymentSettings>();
            var dict = new Dictionary<string, string>(){
                {"server1","first-server"},
                {"server2","second-server"},
                {"catalog","ourCatalog"},
                {"user-id","theUser"},
                {"password","thePassword"}
            };

            var dictionaryKeyValues = new DictionaryKeyValues(dict);
            settings.Stub(x => x.SubstitutionValues()).Return(dictionaryKeyValues);

            var resolver = new ConnectionStringResolver(settings);
            resolver.Resolve(theFileName);
        }
예제 #2
0
        public static string Parse(string template, IDictionary<string, string> substitutions)
        {
            var values = new DictionaryKeyValues(substitutions);

            return Parse(template, values);
        }
        public static string Parse(string template, IDictionary <string, string> substitutions)
        {
            var values = new DictionaryKeyValues(substitutions);

            return(Parse(template, values));
        }
예제 #4
0
 public SamlResponse()
 {
     Attributes = new DictionaryKeyValues<object>(_attributes);
     Subject = new Subject();
 }