Пример #1
0
        public void ClientAggregate_CreateRandomFromRequest()
        {
            //Arrange
            var request = AggregatesRequestBuilder.CreateRandomClientCreateRequest();

            //Act
            var client = ClientAggregate.CreateFromRequest(request);

            // Assert
            client.UserId.Should().Be(request.UserId);
            client.IsDeleted.Should().BeFalse();
        }
Пример #2
0
        public void ClientAggregate_ShouldBeDeleted()
        {
            //Arrange
            var request = AggregatesRequestBuilder.CreateRandomClientCreateRequest();
            var client  = ClientAggregate.CreateFromRequest(request);

            //Act
            client.MarkAsDeleted();

            //Assert
            client.IsDeleted.Should().BeTrue();
        }