Exemplo n.º 1
0
		public void Setup()
		{
			_test = TestFactory.ForHandler<A>()
				.New(x =>
					{
						x.Send(new A());
						x.Send(new B());
					});

			_test.Execute();
		}
Exemplo n.º 2
0
        public void Setup()
        {
            _test = TestFactory.ForHandler <A>()
                    .New(x =>
            {
                x.Send(new A());
                x.Send(new B());
            });

            _test.Execute();
        }
Exemplo n.º 3
0
        public void Setup()
        {
            _test = TestFactory.ForHandler <A>()
                    .New(x =>
            {
//						x.UseRabbitMqBusScenario();

                x.Send(new A());
                x.Send(new B());
            });
            _test.Execute();
        }
Exemplo n.º 4
0
        public void Setup()
        {
            _test = TestFactory.ForHandler <A>()
                    .InLocalRemoteBusScenario()
                    .New(x =>
            {
                x.Send(new A());
                x.Send(new B());
            });

            _test.Execute();
        }
Exemplo n.º 5
0
		public void Setup()
		{
			_test = TestFactory.ForHandler<A>()
				.New(x =>
					{
//						x.UseRabbitMqBusScenario();

						x.Send(new A());
						x.Send(new B());
					});
			_test.Execute();
		}
        public void A_handler_responds_to_a_message_using_context()
        {
            _test = TestFactory.ForHandler <A>()
                    .New(x =>
            {
                x.Handler(async(context) => context.Respond(new B()));

                //x.Send(new A(), (scenario, context) => context.SendResponseTo(scenario.Bus));
            });

            _test.Execute();
        }
Exemplo n.º 7
0
        public void Setup()
        {
            _test = Burrows.Testing.TestFactory.ForHandler <A>()
                    .New(x =>
            {
                x.UseRabbitBusScenario();

                x.Send(new A());
                x.Send(new B());
            });
            _test.Execute();
        }
Exemplo n.º 8
0
		public void A_handler_responds_to_a_message_using_context()
		{
			_test = TestFactory.ForHandler<A>()
				.New(x =>
					{
						x.Handler(async (context) => context.Respond(new B()));

						//x.Send(new A(), (scenario, context) => context.SendResponseTo(scenario.Bus));
					});

			_test.Execute();
		}
Exemplo n.º 9
0
        public void A_message_has_no_default_constructor()
        {
            _test = TestFactory.ForHandler <A>()
                    .New(x =>
            {
                _sent = new A("Dru", "Sellers");
                x.Send(_sent);

                x.Handler((context, message) => { _received = message; });
            });

            _test.Execute();

            _test.Received.Any <A>().ShouldBeTrue();
        }
Exemplo n.º 10
0
        public void Setup()
        {
            _test = TestFactory.ForHandler <A>()
                    .New(x =>
            {
                _sent = new A
                {
                    Contents = new byte[] { 0x56, 0x34, 0xf3 }
                };
                x.Send(_sent);

                x.Handler((context, message) => { _received = message; });
            });

            _test.Execute();

            _test.Received.Any <A>().ShouldBeTrue();
        }
Exemplo n.º 11
0
        public void Setup()
        {
            _test = TestFactory.ForHandler <A>()
                    .New(x =>
            {
                _sent = new A
                {
                    Local     = new DateTime(2001, 9, 11, 8, 46, 30, DateTimeKind.Local),
                    Universal = new DateTime(2001, 9, 11, 9, 3, 2, DateTimeKind.Local).ToUniversalTime(),
                };
                x.Send(_sent);

                x.Handler((context, message) => { _received = message; });
            });

            _test.Execute();

            _test.Received.Any <A>().ShouldBeTrue();
        }