public void DeleteChildContainer() { EAV.Store.Clients.IContainerStoreClient client = factory.Create <EAV.Store.Clients.IContainerStoreClient>(); EAVStoreClient.Container dbParentContainer = SelectRandomItem <EAVStoreClient.Container>(this.DbContext.Containers); EAVStoreClient.Container dbContainerIn = CreateContainer(dbParentContainer.Context_ID, dbParentContainer.Container_ID, Guid.NewGuid().ToString(), rng.Next(), true); client.DeleteContainer(dbContainerIn.Container_ID); EAVStoreClient.Container dbContainerOut = this.DbContext.Containers.SingleOrDefault(it => it.Container_ID == dbContainerIn.Container_ID); Assert.IsNull(dbContainerOut, "Failed to delete container ID {0} from the database.", dbContainerIn.Container_ID); }
public IHttpActionResult DeleteContainer(int id) { try { containerClient.DeleteContainer(id); return(Ok()); } catch (Exception ex) { return(InternalServerError(ex)); } }