コード例 #1
0
        public void AddOrUpdateProject()
        {
            projectController = new ProjectController();
            ProjectModel project = new ProjectModel();

            project.Project   = "Project Test New";
            project.StartDate = DateTime.Now;
            project.EndDate   = DateTime.Now.AddMonths(2);
            project.Priority  = 25;
            JavaScriptSerializer objJavascript = new JavaScriptSerializer();
            var testModels = objJavascript.Serialize(project);
            var isAdded    = projectController.AddOrUpdateProject(testModels);

            Assert.AreEqual("ADD", isAdded);
        }