private async Task <string> GenerateLicenseKey(Guid userId, CancellationToken token) { var hashTextQuery = new HashTextQueryBuilder() .WithText(userId.ToString()) .Build(); return(await _mediator.Send(hashTextQuery, token)); }
public void GivenText_BuildsWithText() { // Arrange var builder = new HashTextQueryBuilder(); const string text = "This is the text"; // Act var resultingReturn = builder.WithText(text); var resultingBuild = builder.Build(); // Assert Assert.Multiple(() => { Assert.That(resultingReturn, Is.EqualTo(builder)); Assert.That(resultingBuild.Text, Is.EqualTo(text)); }); }