コード例 #1
0
        public void Should_Be_Able_To_Resolve_IBusClient()
        {
            /* Setup */
            var builder = new ContainerBuilder();
            builder.RegisterRawRabbit("guest:guest@localhost:5672/");
            var container = builder.Build();

            /* Test */
            var client = container.Resolve<IBusClient>();

            /* Assert */
            Assert.True(true, "Could resolve");
        }
コード例 #2
0
ファイル: AutofacTests.cs プロジェクト: yuriik83/RawRabbit
        public void Should_Be_Able_To_Resolve_BusClient_With_Advanced_Context()
        {
            /* Setup */
            var builder = new ContainerBuilder();
            builder.RegisterRawRabbit<AdvancedMessageContext>("guest:guest@localhost:5672/");
            var container = builder.Build();

            /* Test */
            var client = container.Resolve<IBusClient<AdvancedMessageContext>>();
            client.Dispose();

            /* Assert */
            Assert.True(true, "Could resolve");
        }
コード例 #3
0
ファイル: AutofacTests.cs プロジェクト: pardahlman/RawRabbit
		public async Task Should_Be_Able_To_Resolve_BusClient_With_Advanced_Context()
		{
			/* Setup */
			LogManager.CurrentFactory = new VoidLoggerFactory();
			var builder = new ContainerBuilder();
			builder.RegisterRawRabbit<AdvancedMessageContext>("guest:guest@localhost:5672/");
			var container = builder.Build();

			/* Test */
			var client = container.Resolve<IBusClient<AdvancedMessageContext>>();
			await client.ShutdownAsync(TimeSpan.Zero);

			/* Assert */
			Assert.True(true, "Could resolve");
		}