예제 #1
0
 private TimeframeDto defaultTimeframeDto()
 {
     return(new TimeframeDto
     {
         Id = DEFAULT_ID,
         Symbol = DEFAULT_NAME,
         PeriodCounter = DEFAULT_UNITS_COUNTER,
         PeriodUnit = DEFAULT_UNIT_TYPE.ToString()
     });
 }
예제 #2
0
        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());
        }