public void TestLoginUserServiceGetAll() { IEnumerable <LoginUser> users = new List <LoginUser>() { new LoginUser() { IsActivated = true, IsAdmin = false, UserInfo = new UserInfo() { Email = "*****@*****.**" }, PasswordHash = new byte[] { 1, 2, 3 }, PasswordSalt = new byte[] { 1, 2, 3 }, Id = 1 }, new LoginUser() { IsActivated = true, IsAdmin = false, UserInfo = new UserInfo() { Email = "*****@*****.**" }, PasswordHash = new byte[] { 1, 2, 3 }, PasswordSalt = new byte[] { 1, 2, 3 }, Id = 2 } }; _mockRepo.Setup(repo => repo.ReadAll()).Returns(users); _service.ReadAll(); _mockRepo.Verify(x => x.ReadAll(), Times.Once); }