OverlapsWith() public method

public OverlapsWith ( ITimePeriod test ) : bool
test ITimePeriod
return bool
        public void OverlapsWithTest()
        {
            DateTime now = ClockProxy.Clock.Now;
            TimeSpan offset = Duration.Second;
            TimeRangePeriodRelationTestData testData = new TimeRangePeriodRelationTestData( now, now.AddHours( 1 ), offset );
            TimePeriodCollection timePeriods = new TimePeriodCollection();
            timePeriods.Add( testData.Reference );

            Assert.IsFalse( timePeriods.OverlapsWith( testData.Before ) );
            Assert.IsFalse( timePeriods.OverlapsWith( testData.StartTouching ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.StartInside ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.InsideStartTouching ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.EnclosingStartTouching ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.Enclosing ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.EnclosingEndTouching ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.ExactMatch ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.Inside ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.InsideEndTouching ) );
            Assert.IsTrue( timePeriods.OverlapsWith( testData.EndInside ) );
            Assert.IsFalse( timePeriods.OverlapsWith( testData.EndTouching ) );
            Assert.IsFalse( timePeriods.OverlapsWith( testData.After ) );
        }