public void Output([NotNull] GetUserProfileOutput interactorOutput)
        {
            if (interactorOutput == null)
            {
                throw new ArgumentNullException(nameof(interactorOutput));
            }

            viewModel = new MvcUserProfileViewModel(
                interactorOutput.AllowEdit,
                interactorOutput.UserId,
                interactorOutput.Roles,
                interactorOutput.Email,
                EmailUrlBuilder.GetUrl(interactorOutput.Email),
                interactorOutput.AvatarId,
                interactorOutput.Realname,
                interactorOutput.Firstname,
                interactorOutput.Lastname,
                interactorOutput.MemberSince.ToStringSwissDate(),
                interactorOutput.Slogan,
                interactorOutput.Education,
                interactorOutput.Experience,
                interactorOutput.MobilePhone,
                PhoneUrlBuilder.GetUrl(interactorOutput.MobilePhone),
                interactorOutput.WebsiteUrl,
                interactorOutput.TwitterHandle,
                TwitterUrlBuilder.GetUrl(interactorOutput.TwitterHandle),
                interactorOutput.FacebookId,
                FacebookUrlBuilder.GetUrl(interactorOutput.FacebookId),
                interactorOutput.SkypeId,
                SkypeUrlBuilder.GetUrl(interactorOutput.SkypeId));
        }
Exemplo n.º 2
0
        public void GetUrl_EmptyEmail_ReturnEmpty()
        {
            // Act
            var url = EmailUrlBuilder.GetUrl("");

            // Assert
            url.Should().BeEmpty();
        }
Exemplo n.º 3
0
        public void GetUrl_Success()
        {
            // Act
            var url = EmailUrlBuilder.GetUrl(DiverFactory.JohnDoeEmail);

            // Assert
            url.Should().Be($"mailto:{DiverFactory.JohnDoeEmail}");
        }
 public EmailVerificationService(
     UserManager <Storage.User> userManager,
     EmailUrlBuilder emailUrlBuilder,
     MailBuilder mailBuilder,
     IMailService mailService)
 {
     _userManager     = userManager;
     _emailUrlBuilder = emailUrlBuilder;
     _mailBuilder     = mailBuilder;
     _mailService     = mailService;
 }
Exemplo n.º 5
0
 public PasswordManager(
     UserManager <User> userManager,
     IMailService mailService,
     MailBuilder mailBuilder,
     EmailUrlBuilder emailUrlBuilder
     )
 {
     _userManager     = userManager;
     _mailService     = mailService;
     _mailBuilder     = mailBuilder;
     _emailUrlBuilder = emailUrlBuilder;
 }