public void HandleExceptionTest2() { // User Exception shouldn't change at all ExceptionHandler target = FWUtils.ExpLogUtils.ExceptionHandler; Guid msgGuid = Guid.NewGuid(); Exception exception = new UserException(msgGuid.ToString()); int hashCode = exception.GetHashCode(); string policyName = PolicyName.GlobalPolicy; bool expected = true; bool actual; actual = target.HandleException(ref exception, policyName); Assert.AreEqual(expected, actual); Assert.IsTrue(exception is UserException); Assert.AreEqual(hashCode, exception.GetHashCode()); // user exception shouldn't be logged IServiceBase service = EntityFactory.GetEntityServiceByName(AppExceptionLog.EntityName, ""); FilterExpression filter = new FilterExpression(new Filter(AppExceptionLog.ColumnNames.Message, msgGuid.ToString())); Assert.AreEqual(0, service.GetCount(filter)); }