Пример #1
0
        public async Task <IEnumerable <string> > GetQueues()
        {
            var factory = new BrokerObjectFactory(_config);
            var obj     = factory.Object <HareDu.Queue>();
            var result  = await obj.GetAll();

            return(result.Data.Select(x => x.Name));
        }
Пример #2
0
        public async Task Should_be_able_to_get_all_exchanges_3()
        {
            var provider = new HareDuConfigProvider();
            var config   = provider.Configure(x => { });
            var factory  = new BrokerObjectFactory(config);

            var result = await factory
                         .Object <Exchange>()
                         .GetAll()
                         .ScreenDump();

            // result.HasFaulted.ShouldBeFalse();
            Console.WriteLine(result.ToJsonString(Deserializer.Options));
        }