public static Market FromDto(MarketDto dto) { var market = new Market(dto.Id, dto.Name); market.ShortName = dto.ShortName; market.setTimes(dto.StartTime, dto.EndTime); return market; }
public void constructor_proper_name_and_id_is_assigned() { const int ID = 1; const string NAME = "FX"; Market market = new Market(ID, NAME); Assert.AreEqual(ID, market.Id); Assert.AreEqual(NAME, market.Name); }
public void constructor_new_instance_empty_list_of_assets_is_created() { const int ID = 1; const string NAME = "FX"; Market market = new Market(ID, NAME); Assert.IsNotNull(market.Assets); Assert.IsInstanceOfType(market.Assets, typeof(IEnumerable<Asset>)); }
public void after_creating_fx_market_all_pairs_are_loaded() { //Arrange. arrangeFxMoq(); //Act. var market = new Market(1, "fx"); //Assert. Assert.AreEqual(5, market.Assets.Count()); }
public void isFx_returns_true_if_name_fx() { //Arrange. Market market = new Market(1, "fx"); //Assert. Assert.IsTrue(market.IsFx()); }