public void TestOnCompleted_CompletedSynchronouly_True_SetTrue()
		{
			object owner = new object();
			var target = new NotificationMessageAsyncResult( owner, null, null );
			target.OnCompleted( null, true );
			Assert.That( ( target as IAsyncResult ).CompletedSynchronously, Is.True );
		}
예제 #2
0
        public void TestOnCompleted_CompletedSynchronouly_True_SetTrue()
        {
            object owner  = new object();
            var    target = new NotificationMessageAsyncResult(owner, null, null);

            target.OnCompleted(null, true);
            Assert.That((target as IAsyncResult).CompletedSynchronously, Is.True);
        }
		public void TestOnCompleted_ErrorIsSet()
		{
			object owner = new object();
			var target = new NotificationMessageAsyncResult( owner, null, null );
			var error = new Exception();
			target.OnCompleted( error, false );
			Assert.That( target.Error, Is.SameAs( error ) );
		}
예제 #4
0
        public void TestOnCompleted_ErrorIsSet()
        {
            object owner  = new object();
            var    target = new NotificationMessageAsyncResult(owner, null, null);
            var    error  = new Exception();

            target.OnCompleted(error, false);
            Assert.That(target.Error, Is.SameAs(error));
        }