Exemplo n.º 1
0
        public void AsyncTestException()
        {
            ConverterService cs = new ConverterService();
            IAsyncResult     ar = cs.BeginSetCurrencyRate("EUR", 0.5, null, null);

            try
            {
                cs.EndSetCurrencyRate(ar);
                Assert.Fail("#0");
            }
            catch (SoapException ex)
            {
                Assert.IsTrue(ex.Message.IndexOf("User not logged") != -1, "#1");
                Assert.AreEqual(SoapException.ServerFaultCode, ex.Code, "#2");
            }
        }
Exemplo n.º 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");
		}
Exemplo n.º 3
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");
        }
Exemplo n.º 4
0
		public void AsyncTestException ()
		{
			ConverterService cs = new ConverterService ();
			IAsyncResult ar = cs.BeginSetCurrencyRate ("EUR", 0.5, null, null);
			try
			{
				cs.EndSetCurrencyRate (ar);
				Assert.Fail ("#0");
			}
			catch (SoapException ex)
			{
				Assert.IsTrue (ex.Message.IndexOf ("User not logged") != -1, "#1");
				Assert.AreEqual (SoapException.ServerFaultCode, ex.Code, "#2");
			}
		}