Exemplo n.º 1
0
        private async Task onEventAsync(object sender, MockEventArgs e)
        {
            await Task.Delay(1);

            Assert.AreEqual(x, e.X);
            asyncEvents++;
        }
        private void Sp_OnMockExecution(object sender, MockEventArgs args)
        {
            long id = args.Input.GetLong(args.Input.GetOrdinal("Id"));

            if (id > 0)
            {
                args.Input.SetBool(args.Input.GetOrdinal("IsEnabled"), true);
                args.Input.SetInt(args.Input.GetOrdinal("RowChanged"), 19);
            }

            args.Result = 1;
        }
        public void Create()
        {
            var id           = new EndpointId("sendingEndpoint");
            var notification = NotificationId.Create(
                typeof(InteractionExtensionsTest.IMockNotificationSetWithTypedEventHandler).GetEvent("OnMyEvent"));
            var args = new MockEventArgs(1);
            var notificationRaised = new NotificationRaisedData(notification, args);
            var msg = new NotificationRaisedMessage(id, notificationRaised);

            Assert.AreSame(id, msg.Sender);
            Assert.AreSame(notification, msg.Notification.Notification);
            Assert.AreSame(args, msg.Notification.EventArgs);
        }
Exemplo n.º 4
0
		private async Task onEventAsync(object sender, MockEventArgs e)
		{
			await Task.Delay (1);
			Assert.AreEqual (x, e.X);
			asyncEvents++;
		}
Exemplo n.º 5
0
		private void onEvent(object sender, MockEventArgs e)
		{
			Assert.AreEqual (x, e.X);
			syncEvents++;
		}
Exemplo n.º 6
0
 private void onEvent(object sender, MockEventArgs e)
 {
     Assert.AreEqual(x, e.X);
     syncEvents++;
 }
Exemplo n.º 7
0
 static void OnEventFired(MockEventArgs args)
 {
 }
Exemplo n.º 8
0
 private Task onEventAsyncWithBlockingInvoke(MockEventArgs e)
 {
     Assert.AreEqual(x, e.X);
     asyncEvents++;
     return(Task.FromResult(true));
 }
Exemplo n.º 9
0
 private void onEvent(MockEventArgs e)
 {
     Assert.AreEqual(x, e.X);
     syncEvents++;
 }
Exemplo n.º 10
0
 private void onEventDontClaim(MockEventArgs e, ref ClaimEventToken token)
 {
     Assert.AreEqual(x, e.X);
     syncEvents++;
 }