Save() 개인적인 메소드

private Save ( FootlooseFS.Models.Person person ) : System.Web.Mvc.ContentResult
person FootlooseFS.Models.Person
리턴 System.Web.Mvc.ContentResult
        public void TestPersonSave()
        {
            PersonController personController = new PersonController(mockFootlooseFSService.Object);

            FormCollection formCollection = new FormCollection();
            formCollection.Add("personID", "1");
            formCollection.Add("firstName", "Pam");
            formCollection.Add("lastName", "Scicchitano");
            formCollection.Add("emailAddress", "*****@*****.**");

            formCollection.Add("homePhone", "336-418-5000");
            formCollection.Add("workPhone", "336-418-4000");
            formCollection.Add("cellPhone", "336-418-3000");

            formCollection.Add("homeAddressID", "1");
            formCollection.Add("homeStreetAddress", "38 S Dunworth St #4185");
            formCollection.Add("homeCity", "Raleigh");
            formCollection.Add("homeState", "NC");
            formCollection.Add("homeZip", "27215");

            formCollection.Add("workAddressID", "2");
            formCollection.Add("workStreetAddress", "38 S Dunworth St #4185");
            formCollection.Add("workCity", "Raleigh");
            formCollection.Add("workState", "NC");
            formCollection.Add("workZip", "27215");

            formCollection.Add("altAddressID", "1");
            formCollection.Add("altStreetAddress", "38 S Dunworth St #4185");
            formCollection.Add("altCity", "Raleigh");
            formCollection.Add("altState", "NC");
            formCollection.Add("altZip", "27215");

            ActionResult result = personController.Save(formCollection);

            // Verify that the result is of type JsonResult
            Assert.IsInstanceOfType(result, typeof(JsonResult));

            var jsonResult = result as JsonResult;

            // Verify that the model of the result is SavePersonResult
            Assert.IsInstanceOfType(jsonResult.Data, typeof(SavePersonResult));

            var savePersonResult = jsonResult.Data as SavePersonResult;

            // Verify that Person object returned from the OperationStatus has the data provided from the form
            Assert.AreEqual(savePersonResult.Person.PersonID, 1);
            Assert.AreEqual(savePersonResult.Person.FirstName, "Pam");
            Assert.AreEqual(savePersonResult.Person.LastName, "Scicchitano");
            Assert.AreEqual(savePersonResult.Person.EmailAddress, "*****@*****.**");
        }
        public void TestPersonSave()
        {
            PersonController personController = new PersonController(mockPersonService.Object);

            var person = new Person();
            person.PersonID = 1;
            person.FirstName = "Pam";
            person.LastName = "Scicchitano";
            person.EmailAddress = "*****@*****.**";

            ActionResult result = personController.Save(person);

            // Verify that the result is of type ContentResult
            Assert.IsInstanceOf<ContentResult>(result);
        }