public void GetUserByEmailApplicationNull()
        {
            var userApp = this.UserApp();

            userApp.Application = null;
            var core = new UserCore();

            core.GetByEmail(userApp);
        }
        public void GetUserByEmailInvalidApplicationId()
        {
            var userApp = this.UserApp();

            userApp.Application.Identifier = Guid.Empty;
            var core = new UserCore();

            core.GetByEmail(userApp);
        }
        public void GetUserByEmailUserNull()
        {
            var userApp = this.UserApp();

            userApp.User = null;
            var core = new UserCore();

            core.GetByEmail(userApp);
        }
        public void GetUserByEmailInvalidEmail()
        {
            var userApp = this.UserApp();

            userApp.User.Email = StringHelper.NullEmptyWhiteSpace();
            var core = new UserCore();

            core.GetByEmail(userApp);
        }
        public void GetUserByEmail()
        {
            var data  = new UserData(StringHelper.ValidString(), StringHelper.ValidString(), StringHelper.ValidString());
            var table = new AzureTable <UserData>(ServerConfiguration.Default);

            table.AddEntity(data);

            var userApp = new UserApplication()
            {
                Application = Application.Default,
                User        = data.Convert(),
            };

            var core  = new UserCore();
            var saved = core.GetByEmail(userApp);

            Assert.IsNotNull(saved);
            Assert.AreEqual <Guid>(data.Id, saved.Identifier);
            Assert.AreEqual <string>(data.Email, saved.Email);
            Assert.AreEqual <string>(data.UserName, saved.UserName);
        }
        public void GetUserByEmailNull()
        {
            var core = new UserCore();

            core.GetByEmail(null);
        }