SetValue() public method

Stores an object for the current step.
public SetValue ( object newValue ) : void
newValue object the object to store
return void
        public void TestSetValue3()
        {
            var obj1 = new object();
            var obj2 = new object();
            var manager = new StepScopeLifetimeManager();
            StepSynchronizationManager.Register(_stepExecution1);
            manager.SetValue(obj1);
            StepSynchronizationManager.Register(_stepExecution2);
            manager.SetValue(obj2);

            var result = manager.GetValue();

            Assert.AreEqual(obj2, result);
        }
        public void TestSetValue2()
        {
            var obj = new object();
            var manager = new StepScopeLifetimeManager();
            StepSynchronizationManager.Register(_stepExecution1);
            manager.SetValue(obj);
            StepSynchronizationManager.Register(_stepExecution2);

            var result = manager.GetValue();

            Assert.IsNull(result);
        }