예제 #1
0
        public void A_plain_message_with_an_unknown_relationship_should_not_find_it()
        {
            NameMessage name = new NameMessage {
                Name = "Tom"
            };

            //	ISagaLocator<TestSaga, NameMessage> locator =
            ////		new PropertySagaLocator<TestSaga, NameMessage>(_repository, new ExistingSagaPolicy<TestSaga, NameMessage>(),
            //			(s, m) => s.Name == m.Name);

            //	InstanceScope<TestSaga> saga;
            //	bool found = locator.TryGetSagaForMessage(name, out saga);

            //	Assert.IsFalse(found);
            //	Assert.IsNull(saga);
        }
예제 #2
0
        public void A_plain_message_should_find_the_correct_saga_using_a_property()
        {
            NameMessage name = new NameMessage {
                Name = "Joe"
            };

            //new PropertySagaMessageSink<TestSaga,NameMessage>(context, bus, _repository, new ExistingSagaPolicy<TestSaga, NameMessage>());

            //	bool found = locator.TryGetSagaForMessage(name, out saga);

            //Assert.IsTrue(found);
            //	using (saga)
            {
                //		Assert.IsNotNull(saga);
                //		Assert.IsNotNull(saga.Instance);
                //		Assert.AreEqual(_sagaId, saga.Instance.CorrelationId);
            }
        }