public void TestInspectTemplateDelete() { // Creation var name = $"my-inspect-template-{TestUtil.RandomName()}"; var displayName = $"My display name {Guid.NewGuid()}"; var description = $"My description {Guid.NewGuid()}"; var fullName = $"projects/{Fixture.ProjectId}/inspectTemplates/{name}"; var template = InspectTemplateCreate.Create(Fixture.ProjectId, name, displayName, description, Likelihood.Possible, 5, true); InspectTemplateDelete.Delete(Fixture.ProjectId, template.Name); var list = InspectTemplateList.List(Fixture.ProjectId); Assert.DoesNotContain(list, t => t.Name == fullName); }
public void TestInspectTemplateCreate() { var name = $"my-inspect-template-{TestUtil.RandomName()}"; var displayName = $"My display name {Guid.NewGuid()}"; var description = $"My description {Guid.NewGuid()}"; var fullName = $"projects/{Fixture.ProjectId}/locations/global/inspectTemplates/{name}"; var template = InspectTemplateCreate.Create(Fixture.ProjectId, name, displayName, description, Likelihood.Possible, 5, true); try { Assert.NotNull(template); Assert.Equal(fullName, template.Name); } finally { InspectTemplateDelete.Delete(Fixture.ProjectId, template.Name); } }