public void ShouldCreateDateWithDateTime() { var date = new DateTime(1947, 12, 17); var cypherDate = new CypherDate(date); cypherDate.ToDateTime().Should().Be(date); }
public void ShouldCreateDateWithRawValues() { var date = new DateTime(1947, 12, 17); var cypherDate = new CypherDate((long)date.Subtract(new DateTime(1970, 1, 1)).TotalDays); cypherDate.ToDateTime().Should().Be(date); }
public void ShouldCreateDateWithDateTimeComponents() { var cypherDate = new CypherDate(1947, 12, 17); cypherDate.ToDateTime().Should().Be(new DateTime(1947, 12, 17)); }