public void LogInUser()
        {
            var data = new List <User>
            {
                new User
                {
                    FirstName       = "Stamat",
                    LastName        = "Stamatov",
                    Age             = 13,
                    Email           = "*****@*****.**",
                    PhoneNumber     = "0877253698",
                    Username        = "******",
                    Password        = "******",
                    ConfirmPassword = "******",
                    IsEmployer      = false
                }
            }.AsQueryable();

            var mockSet = new Mock <DbSet <User> >();

            mockSet.As <IQueryable <User> >().Setup(u => u.Provider).Returns(data.Provider);
            mockSet.As <IQueryable <User> >().Setup(u => u.Expression).Returns(data.Expression);
            mockSet.As <IQueryable <User> >().Setup(u => u.ElementType).Returns(data.ElementType);
            mockSet.As <IQueryable <User> >().Setup(u => u.GetEnumerator()).Returns(data.GetEnumerator());

            var mockContext = new Mock <JobApplicationDbContext>();

            mockContext.Setup(c => c.Users).Returns(mockSet.Object);

            var service = new UserService(mockContext.Object);
            var users   = data.ToList();

            users.ForEach(u => service.Register(u.FirstName, u.LastName, u.Age.Value, u.Email, u.PhoneNumber, u.Username, u.Password, u.ConfirmPassword, u.IsEmployer));
            int logInResult = service.Login(users[0].Username, users[0].Password);

            Assert.AreEqual(0, logInResult);
        }