本文整理汇总了C#中FubuTransportation.Runtime.Envelope.IsDelayed方法的典型用法代码示例。如果您正苦于以下问题:C# Envelope.IsDelayed方法的具体用法?C# Envelope.IsDelayed怎么用?C# Envelope.IsDelayed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FubuTransportation.Runtime.Envelope
的用法示例。
在下文中一共展示了Envelope.IsDelayed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: matches_negative_with_no_execution_time_header
public void matches_negative_with_no_execution_time_header()
{
var systemTime = SystemTime.Default();
var envelope = new Envelope();
var handler = new DelayedEnvelopeHandler(systemTime);
envelope.IsDelayed(systemTime.UtcNow()).ShouldBeFalse();
handler.Matches(envelope).ShouldBeFalse();
}
示例2: matches_negative_when_the_execution_time_is_in_the_past
public void matches_negative_when_the_execution_time_is_in_the_past()
{
var systemTime = SystemTime.Default();
var envelope = new Envelope();
envelope.ExecutionTime = systemTime.UtcNow().AddHours(-1);
var handler = new DelayedEnvelopeHandler(systemTime);
envelope.IsDelayed(systemTime.UtcNow()).ShouldBeFalse();
handler.Matches(envelope).ShouldBeFalse();
}
示例3: matches_positive
public void matches_positive()
{
var systemTime = SystemTime.Default();
var envelope = new Envelope();
envelope.ExecutionTime = systemTime.UtcNow().AddHours(1);
var handler = new DelayedEnvelopeHandler(systemTime);
envelope.IsDelayed(systemTime.UtcNow()).ShouldBeTrue();
handler.Matches(envelope).ShouldBeTrue();
}