public void CurrencyDto_Extension_AsEntity_Null() { // Arrange CurrencyDto currency = null; // Act var result = currency.AsEntity(); // Assert Assert.IsNull(result); Assert.AreEqual(null, result); }
public GenericServiceResponse <bool> DeleteCurrency(CurrencyDto currency) { return(TryExecute <GenericServiceResponse <bool> >((response) => { response.Result = Repository.Delete(currency.AsEntity()); if (!response.Result) { var errorMessage = "'DeleteCurrency' was unable to delete the given currency record."; response.Notifications.AddError(errorMessage); Logger.Error(errorMessage); } })); }