ResolveVariable() public method

Resolves variable value for the specified variable name.
public ResolveVariable ( string name ) : string
name string /// The name of the variable to resolve. ///
return string
        public void Basic()
        {
            ConfigurableVariableSource vs = new ConfigurableVariableSource();
            vs.Variables.Add("Key1", "Value1");
            vs.Variables.Add("Key2", "Value2");

            // existing vars
            Assert.IsTrue(vs.CanResolveVariable("key1")); // case insensitive
            Assert.AreEqual("Value1", vs.ResolveVariable("key1")); // case insensitive
            Assert.IsTrue(vs.CanResolveVariable("Key2"));
            Assert.AreEqual("Value2", vs.ResolveVariable("Key2"));

            // non-existant variable
            Assert.IsFalse(vs.CanResolveVariable("Key3"));
            Assert.IsNull(vs.ResolveVariable("Key3"));
        }
        public void Basic()
        {
            ConfigurableVariableSource vs = new ConfigurableVariableSource();

            vs.Variables.Add("Key1", "Value1");
            vs.Variables.Add("Key2", "Value2");

            // existing vars
            Assert.IsTrue(vs.CanResolveVariable("key1"));          // case insensitive
            Assert.AreEqual("Value1", vs.ResolveVariable("key1")); // case insensitive
            Assert.IsTrue(vs.CanResolveVariable("Key2"));
            Assert.AreEqual("Value2", vs.ResolveVariable("Key2"));

            // non-existant variable
            Assert.IsFalse(vs.CanResolveVariable("Key3"));
            Assert.IsNull(vs.ResolveVariable("Key3"));
        }