Set() public method

Sets the value for a key, removing any other _values that are already in the property set.
public Set ( string key, object value ) : void
key string
value object
return void
Beispiel #1
0
 public void SetAddsNewSingleValue()
 {
     bag.Set("Zip", "ZAP");
     Assert.That(bag["Zip"].Count, Is.EqualTo(1));
     Assert.That(bag["Zip"], Has.Member("ZAP"));
     Assert.That(bag.Get("Zip"), Is.EqualTo("ZAP"));
 }
Beispiel #2
0
 public TestParameters(Exception exception)
     : this(RunState.NotRunnable, NoArguments)
 {
     Properties = new PropertyBag();
     Properties.Set(PropertyNames.SkipReason, ExceptionHelper.BuildMessage(exception));
     Properties.Set(PropertyNames.ProviderStackTrace, ExceptionHelper.BuildStackTrace(exception));
 }
Beispiel #3
0
        /// <summary>
        /// Construct a non-runnable ParameterSet, specifying
        /// the provider exception that made it invalid.
        /// </summary>
        public TestParameters(Exception exception)
        {
            RunState = RunState.NotRunnable;
            Properties = new PropertyBag();

            Properties.Set(PropertyNames.SkipReason, ExceptionHelper.BuildMessage(exception));
            Properties.Set(PropertyNames.ProviderStackTrace, ExceptionHelper.BuildStackTrace(exception));
        }