public void SDCaseStateCreate(List <SDCaseState> items, SDCaseState item) { var apiWrapper = GetWrapper <SDCaseState>(); apiWrapper.EntityKeyName = "SDCaseState"; apiWrapper.EntitySetName = "SDCaseStates"; if (item == null && items == null) { apiWrapper.Item = SDCaseStateSample(); } 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.GuidCaseState; var existent = Services.ApiGetByKey <SDCaseState>(url, apiWrapper); Assert.IsNotNull(existent); } }
public SDCaseState SDCaseStateSample() { SDCaseState item = new SDCaseState(); item.GuidCaseState = Guid.NewGuid(); item.Title = Utils.GetString(10); return(item); }