public void ReturnsCloneOfPrototypeObject()
        {
            ICloneable prototype = ACloneableObject();
            IAction action = new ReturnCloneAction(prototype);

            object result = ReturnActionTest.ResultOfAction(action);
            Verify.That(result, !Is.Same(prototype));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes static members of the <see cref="ResultSynthesizer"/> class.
 /// </summary>
 static ResultSynthesizer()
 {
     defaultResults[typeof (string)] = new ReturnAction(String.Empty);
     defaultResults[typeof (ArrayList)] = new ReturnCloneAction(new ArrayList());
     defaultResults[typeof (SortedList)] = new ReturnCloneAction(new SortedList());
     defaultResults[typeof (Hashtable)] = new ReturnCloneAction(new Hashtable());
     defaultResults[typeof (Queue)] = new ReturnCloneAction(new Queue());
     defaultResults[typeof (Stack)] = new ReturnCloneAction(new Stack());
 }