public void Validate_RegUserNameEmpty_ShouldBeFalse()
        {
            var command = new CreateMessageChatCommand
            {
                Content        = "Hello there",
                ConversationId = Guid.Empty,
                RegUserName    = string.Empty
            };

            var validator = new CreateMessageChatCommandValidator();

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(false);
        }
        public void Validate_ValidCommand_ShouldBeTrue()
        {
            var command = new CreateMessageChatCommand
            {
                Content        = "Hello there",
                ConversationId = Guid.NewGuid(),
                RegUserName    = "******"
            };

            var validator = new CreateMessageChatCommandValidator();

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(true);
        }
        public void Validate_ContentExceedMaximunLength_ShouldBeFalse()
        {
            var command = new CreateMessageChatCommand
            {
                Content        = new string('a', 5001),
                ConversationId = Guid.NewGuid(),
                RegUserName    = "******"
            };

            var validator = new CreateMessageChatCommandValidator();

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(false);
        }