GetEra() 공개 메소드

public GetEra ( System.DateTime time ) : int
time System.DateTime
리턴 int
예제 #1
0
        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);
            }
        }