public void currencyFromDto_has_the_same_properties_as_dto() { CurrencyDto dto = new CurrencyDto { Id = DEFAULT_ID, Symbol = DEFAULT_SYMBOL, Name = DEFAULT_NAME }; Currency currency = Currency.FromDto(dto); Assert.AreEqual(DEFAULT_ID, currency.Id); Assert.AreEqual(DEFAULT_SYMBOL, currency.Symbol); Assert.AreEqual(DEFAULT_NAME, currency.Name); }
public static Currency FromDto(CurrencyDto dto) { var currency = new Currency(dto.Id, dto.Symbol, dto.Name); return currency; }