public void CreateWrestlerUploadAndDeleteAttachmentTest(WrestlerModel model) { var id = Wrestler.Create(model); var attachModel = Wrestler.UploadAttachment(id, PathToFiles + model.attaches[0].filename); var result = Wrestler.DeleteAttachment(attachModel.id).result; Assert.AreEqual(true, Boolean.Parse(result)); }
public void CreateWrestlerTest(WrestlerModel model) { var id = Wrestler.Create(model); // compare models var modelCurrent = Wrestler.Read(id); model.CompareModels(modelCurrent); }
public void CreateWrestlerWithPhotoAttachmentAPITest(WrestlerModel model) { var id = Wrestler.Create(model); var attachModel = Wrestler.UploadPhoto(id, PathToFiles + model.attaches[0].filename); //compare models var modelCurrent = Wrestler.Read(id); model.CompareModels(modelCurrent); }
public void CreateWrestlerWithTwoTextAttachmentsTest(WrestlerModel model) { var id = Wrestler.Create(model); for (int i = 0; i < model.attaches.Count; i++) { var attachModel = Wrestler.UploadAttachment(id, PathToFiles + model.attaches[i].filename); //compare attachment model } }
public WrestlerModel Update(WrestlerModel model) { var request = new RestRequest() { Method = Method.PUT, Resource = "/wrestler/update.php", RequestFormat = DataFormat.Json }; request.AddBody(model); return(Execute <WrestlerModel>(request)); }
public string Create(WrestlerModel model) { var request = new RestRequest() { Method = Method.POST, Resource = "/wrestler/create.php", RequestFormat = DataFormat.Json }; request.AddBody(model); var responseModel = Execute <WrestlerModel>(request); return(responseModel.id); }