public void SDAreaCreate(List <SDArea> items, SDArea item) { var apiWrapper = GetWrapper <SDArea>(); apiWrapper.EntityKeyName = "SDArea"; apiWrapper.EntitySetName = "SDAreas"; if (item == null && items == null) { apiWrapper.Item = SDAreaSample(); } else { apiWrapper.Item = item; apiWrapper.Items = items; } var resultCreate = Services.ApiCreate(url, apiWrapper); Assert.IsTrue(resultCreate == "ok"); if (apiWrapper.Item != null) { apiWrapper.ItemKey = apiWrapper.Item.GuidArea; var existent = Services.ApiGetByKey <SDArea>(url, apiWrapper); Assert.IsNotNull(existent); } }
public SDArea SDAreaSample() { SDArea item = new SDArea(); item.GuidArea = Guid.NewGuid(); item.Name = Utils.GetString(10); return(item); }