コード例 #1
0
        public void ShouldNotBeAbleToGetProfileIfEmailDoesNotExist()
        {
            // arrange
            var service = new MembershipService(this.logger, this.emailService, this.userRepository, this.roleRepository, this.profileRepository, this.membershipRepository);
            var request = new GetProfileRequest { IdentityToken = "*****@*****.**" };

            // act
            var profile = service.GetProfile(request);

            // assert
            Assert.That(profile.MessageType, Is.EqualTo(MessageType.Error));
        }
コード例 #2
0
        public void ShouldBeAbleToGetProfileIfEmailExists()
        {
            // arrange
            var service = new MembershipService(this.logger, this.emailService, this.userRepository, this.roleRepository, this.profileRepository, this.membershipRepository);
            var request = new GetProfileRequest { IdentityToken = "*****@*****.**" };

            // act
            var profile = service.GetProfile(request);

            // assert
            Assert.That(profile.FirstName, Is.EqualTo("Vitali"));
        }