예제 #1
0
        public void GetAvatarUrl_ShouldUseCorrectDefaultSize()
        {
            var url = avatarService.GetAvatarUrl("*****@*****.**");
            var md5 = new Md5Generator().GenerateHashValue("*****@*****.**").ToLower();

            Assert.That(url, Is.EqualTo(string.Format("http://www.gravatar.com/avatar/{0}?s=80", md5)));
        }
예제 #2
0
        public void GetAvatarUrl_ShouldReturnUrlWithEmailAddressMd5ValueAndCustomSize()
        {
            var url = avatarService.GetAvatarUrl("*****@*****.**", 200);
            var md5 = new Md5Generator().GenerateHashValue("*****@*****.**").ToLower();

            Assert.That(url, Is.EqualTo(string.Format("http://www.gravatar.com/avatar/{0}?s=200", md5)));
        }
예제 #3
0
 public void SetUp()
 {
     hashGenerator = new Md5Generator();
 }