public void DeleteValidPdfTest() { var ex = Assert.ThrowsAsync <Exception>(() => controller.DeletePdf(trueGuid)); Assert.AreEqual(ex.Message, $"Pdf '{trueGuid}' is active, can't be deleted", "Exception message was not in the expected format"); }