GetEra() public method

public GetEra ( System.DateTime time ) : int
time System.DateTime
return int
コード例 #1
0
ファイル: PPersianCalendarTest.cs プロジェクト: umaranis/Prig
        public void CheckTicksRange_should_be_callable_indirectly()
        {
            using (new IndirectionsContext())
            {
                // Arrange
#if _NET_3_5
                PPersianCalendar.CheckTicksRangeInt64().Body = (@this, ticks) => { };
#else
                PPersianCalendar.CheckTicksRangeInt64().Body = ticks => { };
#endif

                // Act
                var calendar = new PersianCalendar();
                var actual = calendar.GetEra(new DateTime(622, 3, 20));

                // Assert
                Assert.AreEqual(PersianCalendar.PersianEra, actual);
            }
        }