public void GetExpirationTime_Digital_TimeShouldBeCorrect(string now, BinaryOptionsDuration duration, string expected)
        {
            // arrange
            var dtNow      = DateTimeOffset.Parse(now);
            var dtExpected = DateTimeOffset.Parse(expected);

            // act
            var result = DateTimeUtilities.GetExpirationTime(dtNow, duration);

            // assert
            dtExpected.Should().Be(result);
        }
Ejemplo n.º 2
0
 public static DateTimeOffset GetExpirationTime(DateTimeOffset dt, BinaryOptionsDuration duration)
 {
     return(ExpirationTimeTable(dt)[(int)duration]);
 }