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; }
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; }
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; }