示例#1
0
        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);
        }
示例#2
0
文件: Currency.cs 项目: mielk/waluty
 public static Currency FromDto(CurrencyDto dto)
 {
     var currency = new Currency(dto.Id, dto.Symbol, dto.Name);
     return currency;
 }