public void GetRelationTest() { 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.AreEqual( timePeriods.GetRelation( testData.Before ), PeriodRelation.Before ); Assert.AreEqual( timePeriods.GetRelation( testData.StartTouching ), PeriodRelation.StartTouching ); Assert.AreEqual( timePeriods.GetRelation( testData.StartInside ), PeriodRelation.StartInside ); Assert.AreEqual( timePeriods.GetRelation( testData.InsideStartTouching ), PeriodRelation.InsideStartTouching ); Assert.AreEqual( timePeriods.GetRelation( testData.EnclosingStartTouching ), PeriodRelation.EnclosingStartTouching ); Assert.AreEqual( timePeriods.GetRelation( testData.Enclosing ), PeriodRelation.Enclosing ); Assert.AreEqual( timePeriods.GetRelation( testData.EnclosingEndTouching ), PeriodRelation.EnclosingEndTouching ); Assert.AreEqual( timePeriods.GetRelation( testData.ExactMatch ), PeriodRelation.ExactMatch ); Assert.AreEqual( timePeriods.GetRelation( testData.Inside ), PeriodRelation.Inside ); Assert.AreEqual( timePeriods.GetRelation( testData.InsideEndTouching ), PeriodRelation.InsideEndTouching ); Assert.AreEqual( timePeriods.GetRelation( testData.EndInside ), PeriodRelation.EndInside ); Assert.AreEqual( timePeriods.GetRelation( testData.EndTouching ), PeriodRelation.EndTouching ); Assert.AreEqual( timePeriods.GetRelation( testData.After ), PeriodRelation.After ); }