public void FillIfEmpty()
        {
            if (_users.GetUsers().Count == 0)
            {
                FillUsers();
            }

            if (_orders.GetAllOrders().Count == 0)
            {
                FillOrders(_users.GetUser(1, true));
                FillOrders2(_users.GetUser(2, true));
            }
        }
        public ActionResult <IEnumerable <User> > GetAll()
        {
            var users = _userDirectory.GetUsers();

            if (users != null)
            {
                return(new ActionResult <IEnumerable <User> >(users));
            }
            else
            {
                return(new NotFoundResult());
            }
        }
        public void PostUser()
        {
            //Arrange
            var    login    = "******";
            string password = "******";

            //Act
            var responce = UserController.Post(new User()
            {
                Login = login, Password = password
            });

            //Assert
            var user = _directoryService.GetUsers().Single();

            Assert.IsTrue(user.Login == login);
            Assert.IsTrue(user.Password == password);
        }