public void RegisterMemberWithoutDisplayName()
        {
            // Generate a random email address
            userName      = Guid.NewGuid().ToString().Replace("-", "_");
            emailAddress += userName + "@test.com";

            try
            {
                var member = new MemberVm()
                {
                    Email    = emailAddress,
                    Password = "******",
                    Username = userName
                };

                var dbMember = MemberSvc.CreateWithApplication(Manager.Id, member);

                _member        = dbMember.Member;
                _memberOptions = dbMember.Options;
                _memberLogin   = dbMember.Login;

                Assert.AreEqual(MemberManagerMessages.Error.MEMBER_DISPLAY_NAME_REQUIRED, dbMember.Message);
            }
            catch (Exception e)
            {
                Assert.AreEqual(MemberManagerMessages.Error.MEMBER_DISPLAY_NAME_REQUIRED, e.Message);
            }
        }
        public void ExistingUsernameValidation()
        {
            var member = new MemberVm()
            {
                Email    = emailAddress,
                Password = "******",
                Username = userName
            };

            try
            {
                var dbMember = MemberSvc.CreateWithApplication(Manager.Id, member);
                Assert.AreEqual(MemberManagerMessages.Error.USERNAME_EXISTS, dbMember.Message);
            }
            catch (Exception e)
            {
                Assert.AreEqual(e.Message, MemberManagerMessages.Error.USERNAME_EXISTS);
            }
        }
        public void RegisterMember()
        {
            // Generate a random email address
            userName      = Guid.NewGuid().ToString().Replace("-", "_");
            emailAddress += userName + "@test.com";

            var member = new MemberVm()
            {
                Email       = emailAddress,
                Password    = "******",
                DisplayName = "Sam Sample",
                Username    = userName
            };

            var dbMember = MemberSvc.CreateWithApplication(Manager.Id, member);

            _member        = dbMember.Member;
            _memberOptions = dbMember.Options;
            _memberLogin   = dbMember.Login;

            Assert.AreNotEqual(_member.Id, 0);
        }