Esempio n. 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);
            }
        }
 /// <summary>
 /// Gets the era.
 /// </summary>
 /// <returns></returns>
 public int GetEra()
 {
     return(pc.GetEra(dt));
 }