Пример #1
0
            public void should_create_string_with_full_date_in_utc()
            {
                Expires expires = Expires.At(new DateTimeOffset(new DateTime(2014, 5, 6, 7, 8, 9)));

                expires.ToString().
                Should().
                Be("at 2014-05-06T03:08:09");
            }
Пример #2
0
            public void should_create_string_with_full_date_in_utc()
            {
                var     dateTime = new DateTime(2014, 5, 6, 7, 8, 9);
                var     offset   = new TimeSpan(4, 0, 0);
                Expires expires  = Expires.At(new DateTimeOffset(dateTime, offset));

                expires.ToString().
                Should().
                Be("at 2014-05-06T03:08:09");
            }
Пример #3
0
            public void should_create_expires_object_with_date()
            {
                Expires expires = Expires.At(new DateTimeOffset(new DateTime(2014, 5, 6, 7, 8, 9)));

                expires.Period.Should().
                NotHaveValue();
                expires.Date.HasValue.Should().
                BeTrue();
                expires.Date.Should().
                Be(new DateTimeOffset(new DateTime(2014, 5, 6, 7, 8, 9)));
            }
Пример #4
0
            public void should_create_expires_object_with_date()
            {
                var     dateTime = new DateTime(2014, 5, 6, 7, 8, 9);
                var     offset   = new TimeSpan(4, 0, 0);
                Expires expires  = Expires.At(new DateTimeOffset(dateTime, offset));

                expires.Period.Should().
                NotHaveValue();
                expires.Date.HasValue.Should().
                BeTrue();
                expires.Date.Should().
                Be(new DateTimeOffset(dateTime, offset));
            }