Ejemplo n.º 1
0
        protected override void theContextIs()
        {
            var request = new TakeOwnershipRequest
            {
                Subject = theSubject
            };

            theServiceBus.ExpectMessage(request)
            .AtDestination(theNode.ControlChannel)
            .Throws(new DivideByZeroException());

            var task = thePeer.TakeOwnership(theSubject);

            task.Wait(1.Minutes()); // for debugging
            theStatus = task.Result;
        }
Ejemplo n.º 2
0
        protected override void theContextIs()
        {
            var request = new TakeOwnershipRequest
            {
                Subject = theSubject
            };

            theServiceBus.ExpectMessage(request)
            .AtDestination(theNode.ControlChannel)
            .Returns(new TakeOwnershipResponse
            {
                Status = OwnershipStatus.UnknownSubject
            });

            var task = thePeer.TakeOwnership(theSubject);

            task.Wait(1.Minutes()); // for debugging
            theStatus = task.Result;
        }
Ejemplo n.º 3
0
        protected override void theContextIs()
        {
            var request = new TakeOwnershipRequest
            {
                Subject = theSubject
            };

            theServiceBus.ExpectMessage(request)
            .AtDestination(theNode.Addresses.FirstOrDefault())
            .Returns(new TakeOwnershipResponse
            {
                Status = OwnershipStatus.Exception
            });

            var task = thePeer.TakeOwnership(theSubject);

            task.Wait(1.Minutes()); // for debugging
            theStatus = task.Result;
        }