public void LoadMemberProfileWithNote()
        {
            var member = new Member
            {
                Email    = "*****@*****.**",
                OpenId   = ConnectionHelper.OpenId,
                UserName = "******",
                Note     = 2345
            };

            var memberRepository  = A.Fake <IMemberRepository>();
            var accountController = ControllerLocator.GetAccountControllerForConnectedUser(memberRepository);

            A.CallTo(() => memberRepository.Get(member.OpenId)).Returns(member);

            var result       = accountController.Profile() as ViewResult;
            var memberResult = result.ViewData.Model as ProfileModel;

            Assert.That(result, Is.Not.Null);
            Assert.That(memberResult.Email, Is.EqualTo(member.Email));
            Assert.That(memberResult.UserName, Is.EqualTo(member.UserName));
            Assert.That(memberResult.Note, Is.EqualTo(new NoteModel(member.Note)));

            A.CallTo(() => memberRepository.Get(member.OpenId)).MustHaveHappened();
        }
        public void LoadMemberProfileWithNoteWithoutEmail()
        {
            var member = new Member
            {
                Email    = null, // No email was given by member
                OpenId   = ConnectionHelper.OpenId,
                UserName = "******",
                Note     = 2345
            };

            var memberRepository  = A.Fake <IMemberRepository>();
            var accountController = ControllerLocator.GetAccountControllerForConnectedUser(memberRepository);

            A.CallTo(() => memberRepository.Get(member.OpenId)).Returns(member);

            var result       = accountController.Profile() as ViewResult;
            var memberResult = result.ViewData.Model as ProfileModel;

            Assert.That(result, Is.Not.Null);
            Assert.That(memberResult.Email, Is.EqualTo(string.Empty));

            A.CallTo(() => memberRepository.Get(member.OpenId)).MustHaveHappened();
        }