public void GivenRegisterRequest_ReturnsRegisterDto() { // Arrange var register = new RegisterRequest { EmailAddress = "This is an email address", Password = "******" }; // Act var result = register.ToDto(); // Assert Assert.Multiple(() => { Assert.That(result.EmailAddress, Is.EqualTo(register.EmailAddress)); Assert.That(result.PlainTextPassword, Is.EqualTo(register.Password)); }); }
public async Task <IActionResult> RegisterAsync([FromBody] RegisterRequest request, ApiVersion version, CancellationToken token) { await _authenticationInstructor.RegisterAsync(request.ToDto(), token); return(NoContent()); }