public void should_fail_to_get_valid_for_value() { timeToLive.Invoking(ttl => { var validFor = ttl.ValidFor; }) .ShouldThrow <InvalidOperationException>() .WithMessage("instance is not configured to expire in a specific period of time", ComparisonMode.Substring); }
public void should_fail_to_get_expires_at_value() { timeToLive.Invoking(ttl => { var validFor = ttl.ExpiresAt; }) .ShouldThrow <InvalidOperationException>() .WithMessage("instance is not configured to expire at a specific moment in future", ComparisonMode.Substring); }