public void save_and_find()
        {
            var repository = InMemorySagaRepository<FakeState, FakeMessage>.Create();
            var id = Guid.NewGuid();

            var message = new FakeMessage {CorrelationId = id};
            var state = new FakeState {Id = id};
            repository.Save(state, message);

            repository.Find(new FakeMessage {CorrelationId = id})
                      .ShouldBeTheSameAs(state);
        }
        public void save_and_delete_then_find_returns_null()
        {
            var repository = InMemorySagaRepository<FakeState, FakeMessage>.Create();
            var id = Guid.NewGuid();

            var state = new FakeState { Id = id };

            repository.Save(state, null);
            repository.Delete(state, null);

            repository.Find(new FakeMessage {CorrelationId = id})
                      .ShouldBeNull();
        }
        public void save_and_delete_then_find_returns_null()
        {
            var repository = InMemorySagaRepository <FakeState, FakeMessage> .Create();

            var id = Guid.NewGuid();

            var state = new FakeState {
                Id = id
            };


            repository.Save(state, null);
            repository.Delete(state, null);

            repository.Find(new FakeMessage {
                CorrelationId = id
            })
            .ShouldBeNull();
        }
        public void save_and_find()
        {
            var repository = InMemorySagaRepository <FakeState, FakeMessage> .Create();

            var id = Guid.NewGuid();

            var message = new FakeMessage {
                CorrelationId = id
            };
            var state = new FakeState {
                Id = id
            };

            repository.Save(state, message);

            repository.Find(new FakeMessage {
                CorrelationId = id
            })
            .ShouldBeTheSameAs(state);
        }