public void Should_return_default_when_using_finding_saga_with_id_of_another_type()
        {
            var p = new InMemorySagaPersister() as ISagaPersister;
            var id = Guid.NewGuid();
            var simpleSagaEntity = new SimpleSageEntity()
            {
                Id = id,
                OrderSource = "CA"
            };
            p.Save(simpleSagaEntity);

            var anotherSagaEntity = p.Get<AnotherSimpleSageEntity>(id);
            Assert.AreSame(anotherSagaEntity, default(AnotherSimpleSageEntity));
        }
예제 #2
0
        public void Should_return_default_when_using_finding_saga_with_id_of_another_type()
        {
            var p  = new InMemorySagaPersister() as ISagaPersister;
            var id = Guid.NewGuid();
            var simpleSagaEntity = new SimpleSageEntity()
            {
                Id          = id,
                OrderSource = "CA"
            };

            p.Save(simpleSagaEntity);

            var anotherSagaEntity = p.Get <AnotherSimpleSageEntity>(id);

            Assert.AreSame(anotherSagaEntity, default(AnotherSimpleSageEntity));
        }