Esempio n. 1
0
 public void SetUp()
 {
     _receiver       = A.Fake <IServiceBusMessageReceiver>();
     _factory        = A.Fake <IReceiverClientFactory>();
     _receiverClient = A.Fake <IReceiverClient>();
     A.CallTo(() => _factory.Create())
     .Returns(_receiverClient);
     _sut = new GenericServiceBusCommunicationListener(null, _factory, _receiver);
 }
Esempio n. 2
0
        /// <inheritdoc />
        protected override Task <string> OpenImplAsync(CancellationToken cancellationToken)
        {
            ReceiverClient = _clientFactory.Create();
            if (MessagePrefetchCount > 0)
            {
                ReceiverClient.PrefetchCount = MessagePrefetchCount;
            }

            ListenForMessages();

            Thread.Yield();

            //create send url: ??
            var uri = "endpoint://";

            return(Task.FromResult(uri));
        }