Пример #1
0
        public void testSetHebrew_4args()
        {
            int        day      = 1;
            string     month    = "TSH";
            int        year     = 1980;
            bool       yearBC   = false;
            GEDCOMDate instance = new GEDCOMDate(null, null, "", "");

            instance.SetHebrew(day, month, year, yearBC);
            Assert.AreEqual(GEDCOMCalendar.dcHebrew, instance.DateCalendar);
            Assert.AreEqual("@#DHEBREW@ 01 TSH 1980", instance.StringValue);

            // Code coverage
            instance.SetHebrew(day, "", year, yearBC);
            Assert.AreEqual(GEDCOMCalendar.dcHebrew, instance.DateCalendar);
        }
Пример #2
0
        public void testSetHebrew_3args()
        {
            int        day      = 1;
            int        month    = 2;
            int        year     = 1980;
            GEDCOMDate instance = new GEDCOMDate(null, null, "", "");

            instance.SetHebrew(day, month, year);
            Assert.AreEqual(GEDCOMCalendar.dcHebrew, instance.DateCalendar);
            Assert.AreEqual("@#DHEBREW@ 01 CSH 1980", instance.StringValue);
        }
Пример #3
0
        public void testSetFrench_4args()
        {
            int        day      = 1;
            string     month    = "VEND";
            int        year     = 1980;
            bool       yearBC   = false;
            GEDCOMDate instance = new GEDCOMDate(null, null, "", "");

            instance.SetFrench(day, month, year, yearBC);
            Assert.AreEqual(GEDCOMCalendar.dcFrench, instance.DateCalendar);
            Assert.AreEqual("@#DFRENCH R@ 01 VEND 1980", instance.StringValue);

            // Code coverage
            instance.SetHebrew(day, "", year, yearBC);
            Assert.AreEqual(GEDCOMCalendar.dcHebrew, instance.DateCalendar);
        }