public void WhenCallUmbrellaApiToDeleteAllMembers() { var parent = context.Get <Models.Company>("parent").Id; var admin = config.UmbrellaAdmin; try { var r = api.DeleteUmbrellaWithHttpInfo(parent, admin); r.StatusCode.ShouldBe(HttpStatusCode.OK); } catch (ApiException e) { e.ErrorCode.ShouldBe(404); } }
public void WhenUmbrellaIsDeleted(string parentCompanyId) { Console.WriteLine($"company id: {parentCompanyId}"); var baseurl = TestSetup.Config.datahubUmbrellaApi.baseurl; var api = new DefaultApi(baseurl); try { var response = api.DeleteUmbrellaWithHttpInfo(parentCompanyId); response.StatusCode.ShouldBe(HttpStatusCode.OK); } catch (ApiException e) { e.ErrorCode.ShouldBe(404); } }
public void WhenUmbrellaIsCreatedAsFollows(Table table) { var parentId = TableUtils.Get(table, "parent"); var children = TableUtils.Get(table, "children").Split(',').Map(s => s.Trim()); var baseurl = TestSetup.Config.datahubUmbrellaApi.baseurl; var api = new DefaultApi(baseurl); try { api.DeleteUmbrellaWithHttpInfo(parentId) .StatusCode.ShouldBe(HttpStatusCode.OK); } catch (ApiException e) { e.ErrorCode.ShouldBe(404); } var request = new UmbrellaDefinitionRequest(parentId, children.ToList()); api.CreateUmbrellaWithHttpInfo(request) .StatusCode.ShouldBe(HttpStatusCode.OK); }