private static bool ContentNotFoundExceptionIsCorrect(ContentNotFoundException contentNotFoundException, Guid contentGuid) { return contentNotFoundException.ContentGuid.Equals(contentGuid) && contentNotFoundException.Message == string.Format(CultureInfo.InvariantCulture, "Content with Guid \"{0}\" was not found", contentGuid); }
private static bool ContentNotFoundExceptionIsCorrect(ContentNotFoundException contentNotFoundException, PageReference pageLink) { // ReSharper disable SuspiciousTypeConversion.Global return contentNotFoundException.ContentLink.Equals(pageLink) && contentNotFoundException.Message == string.Format(CultureInfo.InvariantCulture, "Content with id {0} was not found", pageLink); // ReSharper restore SuspiciousTypeConversion.Global }