예제 #1
0
        public void SoapServiceTest()
        {
            SoapService webServicesCall = new SoapService();

            People people = new People()
            {
                Gender = "Male",
                Name   = "Radamel Falcao",
                Image  = "https://informe360.com/deportes/wp-content/uploads/2017/02/falcao-500x500_c.jpg"
            };

            var    responseAddPeople = webServicesCall.AddPeople(people);
            string key = responseAddPeople.FirebaseID;

            var responseGetPeople     = webServicesCall.GetPeople();
            var responseGetByIDPeople = webServicesCall.GetByIDPeople(key);
            var responseUpdatePeople  = webServicesCall.UpdatePeople(key, people);
            var responseRemovePeople  = webServicesCall.RemovePeople(key);

            Assert.IsNotNull(responseAddPeople);
            Assert.AreEqual("OK", responseAddPeople.Status);
            Assert.IsNotNull(responseGetPeople);
            Assert.IsNotNull(responseGetByIDPeople);
            Assert.IsNotNull(responseUpdatePeople);

            // TODO: Pending to check.
            Assert.AreEqual(null, responseRemovePeople);
        }
예제 #2
0
        public HttpResponseMessage POST([FromBody] People people)
        {
            var response = webServicesCall.AddPeople(people);

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }