public ActionResult Delete(Guid id) { Log.Information("GET Compound/Delete triggered"); bool isSuccess = _repo.DeleteCompound(id); return(Json(isSuccess, JsonRequestBehavior.AllowGet)); }
public void GetAllCompounds_ReturnsNullForDeletedEntity() { //Arrange var repo = new CompoundRepository(); //Act var compound = repo.GetAllCompounds().First(); repo.DeleteCompound(compound.Id); var result = repo.GetAllCompounds() .SingleOrDefault(c => c.Id.Equals(compound.Id)); //Assert Assert.AreEqual(null, result); }