Esempio n. 1
0
        public void ToString_should_return_expected_result(long value, string expectedResult)
        {
            var subject = new BsonTimestamp(value);

            var result = subject.ToString();

            result.Should().Be(expectedResult);
        }
Esempio n. 2
0
        public static DateTime ConvertToDateTime(this BsonTimestamp Id)
        {
            DateTime dtStart = TimeZoneInfo.ConvertTime(new DateTime(1970, 1, 1, 8, 0, 0, 0), TimeZoneInfo.Local);
            long     lTime   = long.Parse(Id.ToString() + "0000000");
            TimeSpan toNow   = new TimeSpan(lTime);

            return(dtStart.Add(toNow));
        }
Esempio n. 3
0
        public void ToString_should_return_expected_result(long value, string expectedResult)
        {
            var subject = new BsonTimestamp(value);

            var result = subject.ToString();

            result.Should().Be(expectedResult);
        }