public void constructor_newInstanceHasCorrectProperties() { //Act var timeframe = new Timeframe(DEFAULT_ID, DEFAULT_NAME, DEFAULT_UNIT_TYPE, DEFAULT_UNITS_COUNTER); //Assert Assert.AreEqual(DEFAULT_ID, timeframe.GetId()); Assert.AreEqual(DEFAULT_NAME, timeframe.GetName()); Assert.AreEqual(DEFAULT_UNIT_TYPE, timeframe.GetUnitType()); Assert.AreEqual(DEFAULT_UNITS_COUNTER, timeframe.GetUnitsCounter()); }
public void timeframeFromDto_hasSamePropertiesAsDto() { //Act TimeframeDto dto = new TimeframeDto { Id = DEFAULT_ID, Symbol = DEFAULT_NAME, PeriodUnit = DEFAULT_UNIT_TYPE.ToString(), PeriodCounter = DEFAULT_UNITS_COUNTER }; Timeframe timeframe = Timeframe.FromDto(dto); //Assert Assert.AreEqual(DEFAULT_ID, timeframe.GetId()); Assert.AreEqual(DEFAULT_NAME, timeframe.GetName()); Assert.AreEqual(DEFAULT_UNIT_TYPE, timeframe.GetUnitType()); Assert.AreEqual(DEFAULT_UNITS_COUNTER, timeframe.GetUnitsCounter()); }