Пример #1
0
		public void AsyncTestService ()
		{
			IAsyncResult ar;
			acs = new ConverterService ();
			
			ar = acs.BeginLogin ("lluis", null, null);
			acs.EndLogin (ar);
			
			acs.BeginSetCurrencyRate ("EUR", 0.5, new AsyncCallback(Callback1), null);
			
			Assert.IsTrue (eve.WaitOne (5000, false), "#0");
			Assert.IsTrue (a1, "#1");
			
			Assert.IsTrue (eve.WaitOne (5000, false), "#2");
			Assert.IsTrue (a2, "#3");
			
			Assert.IsTrue (eve.WaitOne (5000, false), "#4");
			Assert.IsTrue (a3, "#5");
		}
Пример #2
0
        public void AsyncTestService()
        {
            IAsyncResult ar;

            acs = new ConverterService();

            ar = acs.BeginLogin("lluis", null, null);
            acs.EndLogin(ar);

            acs.BeginSetCurrencyRate("EUR", 0.5, new AsyncCallback(Callback1), null);

            Assert.IsTrue(eve.WaitOne(5000, false), "#0");
            Assert.IsTrue(a1, "#1");

            Assert.IsTrue(eve.WaitOne(5000, false), "#2");
            Assert.IsTrue(a2, "#3");

            Assert.IsTrue(eve.WaitOne(5000, false), "#4");
            Assert.IsTrue(a3, "#5");
        }