public void Validate_ValidCommand_ShouldBeTrue() { var command = new PinAttachFileCommand { MessageId = Guid.NewGuid(), BlobStorageUrl = "https://domain.com/blob-container/kxg5qfz4.jxl", IsPinFile = true }; var validator = new PinAttachFileCommandValidator(); var result = validator.Validate(command); result.IsValid.ShouldBe(true); }
public void Validate_BlobStorageUrlEmptyOrNull_ShouldBeFalse() { var command = new PinAttachFileCommand { MessageId = Guid.NewGuid(), BlobStorageUrl = null, IsPinFile = true }; var validator = new PinAttachFileCommandValidator(); var result = validator.Validate(command); result.IsValid.ShouldBe(false); }