Example #1
0
            public void should_create_expires_object_with_period()
            {
                Expires expires = Expires.Parse("in 15");

                expires.Period.Should().
                Be(15.Seconds());
            }
Example #2
0
            public void should_create_expires_object_with_date()
            {
                Expires expires = Expires.Parse("at 2014-05-06T03:08:09");

                expires.Date.Should().
                Be(new DateTimeOffset(new DateTime(2014, 5, 6, 7, 8, 9)));
            }
Example #3
0
            public void should_create_expires_object_with_date()
            {
                Expires expires = Expires.Parse("at 2014-05-06T03:08:09");

                expires.Date.Should().
                Be(new DateTimeOffset(new DateTime(2014, 5, 6, 3, 8, 9), new TimeSpan(0, 0, 0)).ToLocalTime());
            }
Example #4
0
 public void should_throw(string s)
 {
     Expires.Parse(s);
 }