DateExtensionsTests CheckIsDateNewer Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void CheckIsDateNewer()
Examples

[Test]
public void CheckIsDateNewer()
{
    Assert.IsTrue(DateExtensions.IsDateNewerByOneSecond(DateTime.Now, DateTime.Today));
    Assert.IsTrue(DateExtensions.IsDateNewerByOneSecond(DateTime.Today, DateTime.MinValue));
    var santaClassIsComing = new DateTime(2013, 12, 24, 23, 0, 0);
    var santaClassIsComingTinyBitLater = new DateTime(2013, 12, 24, 23, 0, 0, 500);
    var santaClassIsComingEvenLater = new DateTime(2013, 12, 24, 23, 0, 1, 500);
    Assert.IsFalse(DateExtensions.IsDateNewerByOneSecond(santaClassIsComingTinyBitLater,
        santaClassIsComing));
    Assert.IsTrue(DateExtensions.IsDateNewerByOneSecond(santaClassIsComingEvenLater,
        santaClassIsComing));
}
See Also