Setup() public method

public Setup ( System.DateTime newStart, System.DateTime newEnd ) : void
newStart System.DateTime
newEnd System.DateTime
return void
Ejemplo n.º 1
0
        public void SetupTest()
        {
            TimeRange timeRange1 = new TimeRange();
            timeRange1.Setup( TimeSpec.MinPeriodDate, TimeSpec.MinPeriodDate );
            Assert.AreEqual( timeRange1.Start, TimeSpec.MinPeriodDate );
            Assert.AreEqual( timeRange1.End, TimeSpec.MinPeriodDate );

            TimeRange timeRange2 = new TimeRange();
            timeRange2.Setup( TimeSpec.MinPeriodDate, TimeSpec.MaxPeriodDate );
            Assert.AreEqual( timeRange2.Start, TimeSpec.MinPeriodDate );
            Assert.AreEqual( timeRange2.End, TimeSpec.MaxPeriodDate );

            TimeRange timeRange3 = new TimeRange();
            timeRange3.Setup( TimeSpec.MaxPeriodDate, TimeSpec.MinPeriodDate );
            Assert.AreEqual( timeRange3.Start, TimeSpec.MinPeriodDate );
            Assert.AreEqual( timeRange3.End, TimeSpec.MaxPeriodDate );
        }