public void Delete() { BuildProject project = Instance.Create.BuildProject("My Project", "Project"); AssetID id = project.ID; project.Delete(); ResetInstance(); Assert.IsNull(Instance.Get.BuildProjectByID(id)); }
[Test] public void DeleteCascadeRuns() { BuildProject project = Instance.Create.BuildProject("My Project", "Project"); IList <AssetID> ids = new List <AssetID>(); ids.Add(project.ID); ids.Add(project.CreateBuildRun("Run 1", new DateTime(2008, 1, 1)).ID); ids.Add(project.CreateBuildRun("Run 2", new DateTime(2008, 1, 2)).ID); ids.Add(project.CreateBuildRun("Run 3", new DateTime(2008, 1, 3)).ID); project.Delete(); ResetInstance(); foreach (AssetID id in ids) { Assert.IsNull(Instance.Get.BaseAssetByID(id)); } }