Пример #1
0
        public void GetHashCode_should_be_the_state_hashcode()
        {
            var id    = ParentEntityId.Generate();
            var state = new ParentState().Apply(new ParentCreated(id, "test parent", DateTime.UtcNow));

            var parent = new ParentEntity(Enumerable.Empty <IEvent>(), state);

            parent.GetHashCode().Should().Be(parent.StateModel.GetHashCode());
        }