コード例 #1
0
        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));
        }
コード例 #2
0
        public void GetUrl_EmptyEmail_ReturnEmpty()
        {
            // Act
            var url = EmailUrlBuilder.GetUrl("");

            // Assert
            url.Should().BeEmpty();
        }
コード例 #3
0
        public void GetUrl_Success()
        {
            // Act
            var url = EmailUrlBuilder.GetUrl(DiverFactory.JohnDoeEmail);

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