예제 #1
0
 public when_time_to_live_is_set_to_expire_at_specific_moment()
 {
     Given(() => timeToLive = TimeToLive.CreateExpiringAt(expiringAt));
 }
예제 #2
0
 public void should_not_equal_to_time_to_live_which_never_expiring_or_expire_at_absolute_time()
 {
     timeToLive.Should().NotBe(TimeToLive.CreateNeverExpiring());
     timeToLive.Should().NotBe(TimeToLive.CreateExpiringAt(new DateTime(2011, 1, 1)));
 }
예제 #3
0
 public void should_not_equal_to_time_to_live_which_expire_at_absolute_time_or_relative()
 {
     timeToLive.Should().NotBe(TimeToLive.CreateExpiringAt(new DateTime(2011, 1, 1)));
     timeToLive.Should().NotBe(TimeToLive.CreateValidFor(TimeSpan.FromSeconds(2)));
 }
예제 #4
0
 public void should_equal_to_another_instance_of_time_to_live_which_expires_at_the_same_moment()
 {
     timeToLive.Should().Be(TimeToLive.CreateExpiringAt(expiringAt));
     timeToLive.Should().NotBe(TimeToLive.CreateExpiringAt(expiringAt.AddDays(1)));
 }