public void Can_add_entity_only_once()
        {
            var entity     = Substitute.For <IAggregate>();
            var repository = new InMemoryTestRepository();

            repository.Add(entity);

            Assert.AreEqual(1, repository.CurrentState.Count);

            repository.Add(entity);

            Assert.AreEqual(1, repository.CurrentState.Count);
        }
        public void Cant_remove_non_added_entity()
        {
            var entity     = Substitute.For <AggregateRoot>();
            var repository = new InMemoryTestRepository();

            repository.Add(Substitute.For <AggregateRoot>());

            Assert.AreEqual(1, repository.CurrentState.Count);

            repository.Remove(entity);

            Assert.AreEqual(1, repository.CurrentState.Count);
        }