Пример #1
0
        private void lbxUserList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string userInfo = lbxUserList.SelectedItem.ToString();

            this.Hide();
            pc.AddUser(uc.GetUser2(userInfo), open);
            this.Close();
        }
        public void AddUser()
        {
            UserData lstUserData = new UserData()
            {
                UserID     = 1,
                FirstName  = "User First",
                LastName   = "User Last",
                EmployeeID = "369470",
                ProjectID  = 1,
                TaskID     = 1
            };
            var controller = new ProjectController()
            {
                Request       = new System.Net.Http.HttpRequestMessage(),
                Configuration = new HttpConfiguration()
            };

            Assert.AreEqual("OK", controller.AddUser(lstUserData).StatusCode.ToString());
        }