Ejemplo n.º 1
0
        public void AysncInvokeList()
        {
            var list = new InvokeList();

            list.Invoke();
            Assert.AreEqual <string>("hello,world", list[0] + list[1] + list[2]);
        }
        public void InvokeListTest()
        {
            string     message = string.Empty;
            InvokeList list    = new InvokeList();

            list.Invoke();
            Assert.AreEqual <string>("hello,world", list[0] + list[1] + list[2]);
        }
Ejemplo n.º 3
0
        public void InvokeTest()
        {
            var message    = string.Empty;
            var invokeList = new InvokeList();

            invokeList.Invoke();
            Assert.AreEqual("hello,world", invokeList[0] + invokeList[1] + invokeList[2]);
        }
Ejemplo n.º 4
0
        public void InvokeListTest()
        {
            InvokeList list = new InvokeList();

            //list.Invoke();
            list.MulticastDelegateInvoke();
            Assert.AreEqual("hello", list[0]);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Adds an action to perform on the fixture.<br />
        /// This uses the result of the previous invocation.
        /// </summary>
        /// <param name="action">The action.</param>
        public ITestDefinition <TFixture> InvokeWithResult(TestActionWithResult <TFixture> action)
        {
            void Newaction(TFixture x)
            {
                action(x, GetLastResult());
                InvokeResults.Add(new InvokeResult());
            }

            InvokeList.Add(Newaction);
            return(this);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Adds a function to perform on the fixture.<br />
        /// </summary>
        /// <typeparam name="TResult">The type of the result.</typeparam>
        /// <param name="func">The function.</param>
        public ITestDefinition <TFixture> Invoke <TResult>(TestFunction <TFixture, TResult> func)
        {
            void Newaction(TFixture x)
            {
                var result = func(x);

                InvokeResults.Add(new InvokeResultObject(result));
            }

            InvokeList.Add(Newaction);
            return(this);
        }
Ejemplo n.º 7
0
        public void InvokeListTest()
        {
            InvokeList list = new InvokeList();

            Assert.AreEqual("Hello World", list[0] + list[1] + list[2]);
        }
Ejemplo n.º 8
0
 World()
 {
     m_preTickInvokeList = new InvokeList(this);
     m_instantInvokeList = new InvokeList(this);
 }