GetDateTime() public method

public GetDateTime ( Date date ) : System.DateTime
date Date
return System.DateTime
Exemplo n.º 1
0
        public void GetEmptyDateTimeTest()
        {
            DateTime dateTime = new DateTime( 2009, 7, 22 );
            Time time = new Time();

            Assert.AreEqual( time.GetDateTime( dateTime ), dateTime );
        }
Exemplo n.º 2
0
        public void GetDateTimeTest()
        {
            DateTime dateTime = new DateTime( 2009, 7, 22 );
            TimeSpan timeSpan = new TimeSpan( 0, 18, 23, 56, 344 );
            Time time = new Time( timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds );

            Assert.AreEqual( time.GetDateTime( dateTime ), dateTime.Add( timeSpan ) );
        }