Exemple #1
0
 public ActionResult SiteMapDelete([DataSourceRequest] DataSourceRequest request,
                                   SiteMap siteMap)
 {
     if (siteMap != null && ModelState.IsValid)
     {
         _siteService.Delete(siteMap);
     }
     return(Json(new[] { siteMap }.ToDataSourceResult(request, ModelState)));
 }
Exemple #2
0
 public void GetUsers_OnDeletedObject_Throws()
 {
     Site.Delete();
     Assert.That(() => Site.GetUsers(), Throws.TypeOf <InvalidOperationException>());
 }
Exemple #3
0
 public void Delete_Site_Auction_Throws()
 {
     Site.Delete();
     Assert.That(() => TheAuction.Delete(), Throws.TypeOf <InvalidOperationException>());
 }
Exemple #4
0
 public void Delete_TwoSites()
 {
     Site1.Delete();
     Assert.That(siteFactory.GetSiteNames(connectionString).Any(s => s == "working site 2"), Is.True);
 }
 public void Delete_Site_Users_Throws()
 {
     Site.Delete();
     Assert.That(() => User.Delete(), Throws.TypeOf <InvalidOperationException>());
 }