Ejemplo n.º 1
0
        public void ReturnsCloneOfPrototypeObject()
        {
            ICloneable prototype = ACloneableObject();
            IAction    action    = new ReturnCloneAction(prototype);

            object result = ReturnActionTest.ResultOfAction(action);

            Verify.That(result, !Is.EqualTo(prototype));
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Initializes static members of the <see cref="ResultSynthesizer"/> class.
		/// </summary>
		static ResultSynthesizer()
		{
			defaultResults[typeof(string)] = new ReturnAction(String.Empty);
/* ^ */
#if !SILVERLIGHT && !NETCORE
/* [email protected] ^ */
			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());
#endif
		}