public async void DeleteReferenceTest() { Workspace workspace = await CrateWorkspace(); Component source = await CreateComponent(workspace, "Source"); Component target = await CreateComponent(workspace, "Target"); Reference referenceTemplate = CreateReferenceTemplate(workspace, source, target); Reference result = await service.CreateReference(referenceTemplate); await service.DeleteReference(result.Id); try { await service.GetReferenceById(result.Id); await DeleteWorkspace(workspace); Assert.Fail("Expected the reference to be deleted."); } catch (Refit.ApiException e) { Assert.AreEqual(System.Net.HttpStatusCode.NotFound, e.StatusCode); } await DeleteWorkspace(workspace); }