Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(string, string, bool, System.Globalization.CultureInfo, string, params object[])

Here are the examples of the csharp api Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual(string, string, bool, System.Globalization.CultureInfo, string, params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1690 Examples 7

19 Source : BaZiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void testXiaoYun()
        {
            Solar solar = new Solar(1983, 2, 15, 20, 0, 0);
            Lunar lunar = solar.getLunar();
            EightChar bazi = lunar.getEightChar();
            Yun yun = bazi.getYun(0);
            DaYun[] daYun = yun.getDaYun();

            int[] years = { 1983, 1984, 1985, 1986, 1987, 1988 };
            int[] ages = { 1, 2, 3, 4, 5, 6 };
            String[] ganZhi = { "乙亥", "丙子", "丁丑", "戊寅", "己卯", "庚辰" };
            XiaoYun[] l = daYun[0].getXiaoYun();
            for (int i = 0, j = l.Length; i < j; i++)
            {
                XiaoYun xiaoYun = l[i];
                replacedert.AreEqual(years[i], xiaoYun.getYear());
                replacedert.AreEqual(ages[i], xiaoYun.getAge());
                replacedert.AreEqual(ganZhi[i], xiaoYun.getGanZhi());
            }

            years = new int[] { 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038 };
            ages = new int[] { 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 };
            ganZhi = new String[] { "辛酉", "壬戌", "癸亥", "甲子", "乙丑", "丙寅", "丁卯", "戊辰", "己巳", "庚午" };
            l = daYun[5].getXiaoYun();
            for (int i = 0, j = l.Length; i < j; i++)
            {
                XiaoYun xiaoYun = l[i];
                replacedert.AreEqual(years[i], xiaoYun.getYear());
                replacedert.AreEqual(ages[i], xiaoYun.getAge());
                replacedert.AreEqual(ganZhi[i], xiaoYun.getGanZhi(), years[i] + "年");
            }
        }

19 Source : BaZiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void testGanZhi()
        {
            Solar solar = new Solar(1988, 2, 15, 23, 30, 0);
            Lunar lunar = solar.getLunar();
            EightChar eightChar = lunar.getEightChar();

            replacedert.AreEqual("戊辰", eightChar.getYear(), "年柱");
            replacedert.AreEqual("甲寅", eightChar.getMonth(), "月柱");
            replacedert.AreEqual("庚子", eightChar.getDay(), "日柱");
            replacedert.AreEqual("戊子", eightChar.getTime(), "时柱");

            eightChar.setSect(1);
            replacedert.AreEqual("戊辰", eightChar.getYear(), "年柱");
            replacedert.AreEqual("甲寅", eightChar.getMonth(), "月柱");
            replacedert.AreEqual("辛丑", eightChar.getDay(), "日柱");
            replacedert.AreEqual("戊子", eightChar.getTime(), "时柱");

            solar = new Solar(1988, 2, 15, 22, 30, 0);
            lunar = solar.getLunar();
            eightChar = lunar.getEightChar();
            replacedert.AreEqual("戊辰", eightChar.getYear(), "年柱");
            replacedert.AreEqual("甲寅", eightChar.getMonth(), "月柱");
            replacedert.AreEqual("庚子", eightChar.getDay(), "日柱");
            replacedert.AreEqual("丁亥", eightChar.getTime(), "时柱");

            solar = new Solar(1988, 2, 2, 22, 30, 0);
            lunar = solar.getLunar();
            eightChar = lunar.getEightChar();
            replacedert.AreEqual("丁卯", eightChar.getYear(), "年柱");
            replacedert.AreEqual("癸丑", eightChar.getMonth(), "月柱");
            replacedert.AreEqual("丁亥", eightChar.getDay(), "日柱");
            replacedert.AreEqual("辛亥", eightChar.getTime(), "时柱");
        }

19 Source : FestivalTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void testNext()
        {
            Solar solar = Solar.fromYmd(2020, 11, 26);
            replacedert.AreEqual("感恩节", solar.getFestivals()[0]);

            solar = Solar.fromYmd(2020, 6, 21);
            replacedert.AreEqual("父亲节", solar.getFestivals()[0]);

            solar = Solar.fromYmd(2021, 5, 9);
            replacedert.AreEqual("母亲节", solar.getFestivals()[0]);

            solar = Solar.fromYmd(1986, 11, 27);
            replacedert.AreEqual("感恩节", solar.getFestivals()[0]);

            solar = Solar.fromYmd(1985, 6, 16);
            replacedert.AreEqual("父亲节", solar.getFestivals()[0]);

            solar = Solar.fromYmd(1984, 5, 13);
            replacedert.AreEqual("母亲节", solar.getFestivals()[0]);
        }

19 Source : FuTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test3()
        {
            Solar solar = new Solar(2011, 7, 24);
            Lunar lunar = solar.getLunar();
            Fu fu = lunar.getFu();
            replacedert.AreEqual("中伏", fu.toString(), solar.toYmd());
            replacedert.AreEqual("中伏第1天", fu.toFullString(), solar.toYmd());
        }

19 Source : FuTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test11()
        {
            Solar solar = new Solar(2012, 8, 8);
            Lunar lunar = solar.getLunar();
            Fu fu = lunar.getFu();
            replacedert.AreEqual("末伏", fu.toString(), solar.toYmd());
            replacedert.AreEqual("末伏第2天", fu.toFullString(), solar.toYmd());
        }

19 Source : FuTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test13()
        {
            Solar solar = new Solar(2020, 7, 26);
            Lunar lunar = solar.getLunar();
            Fu fu = lunar.getFu();
            replacedert.AreEqual("中伏", fu.toString(), solar.toYmd());
            replacedert.AreEqual("中伏第1天", fu.toFullString(), solar.toYmd());
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test2()
        {
            int year = 2020;
            int month = 1;
            int day = 6;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("己亥", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test3()
        {
            int year = 2020;
            int month = 1;
            int day = 20;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("己亥", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test5()
        {
            int year = 2020;
            int month = 1;
            int day = 30;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test6()
        {
            int year = 2020;
            int month = 2;
            int day = 1;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test7()
        {
            int year = 2020;
            int month = 2;
            int day = 4;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("戊寅", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丁丑", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test8()
        {
            int year = 2020;
            int month = 2;
            int day = 4;
            int hour = 18;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("戊寅", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("戊寅", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test9()
        {
            int year = 2020;
            int month = 2;
            int day = 5;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("戊寅", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("戊寅", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test10()
        {
            int year = 2020;
            int month = 5;
            int day = 22;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test11()
        {
            int year = 2020;
            int month = 5;
            int day = 23;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test12()
        {
            int year = 2020;
            int month = 5;
            int day = 29;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test13()
        {
            int year = 2020;
            int month = 6;
            int day = 1;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("辛巳", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test14()
        {
            int year = 2020;
            int month = 6;
            int day = 29;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("庚子", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("庚子", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("壬午", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("壬午", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test15()
        {
            int year = 2019;
            int month = 5;
            int day = 1;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("己亥", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("戊辰", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("戊辰", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test16()
        {
            int year = 1986;
            int month = 5;
            int day = 29;
            int hour = 13;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("丙寅", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丙寅", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("丙寅", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("癸巳", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("癸巳", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test17()
        {
            int year = 1986;
            int month = 5;
            int day = 1;
            int hour = 1;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("丙寅", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丙寅", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("丙寅", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("壬辰", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("壬辰", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : GanZhiTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test18()
        {
            int year = 1986;
            int month = 5;
            int day = 6;
            int hour = 1;
            int minute = 22;
            int second = 0;

            Solar solar = new Solar(year, month, day, hour, minute, second);
            Lunar lunar = solar.getLunar();

            replacedert.AreEqual("丙寅", lunar.getYearInGanZhi(), "getYearInGanZhi 未返回所需的值。");
            replacedert.AreEqual("丙寅", lunar.getYearInGanZhiByLiChun(), "getYearInGanZhiByLiChun 未返回所需的值。");
            replacedert.AreEqual("丙寅", lunar.getYearInGanZhiExact(), "getYearInGanZhiExact 未返回所需的值。");

            replacedert.AreEqual("癸巳", lunar.getMonthInGanZhi(), "getMonthInGanZhi 未返回所需的值。");
            replacedert.AreEqual("壬辰", lunar.getMonthInGanZhiExact(), "getMonthInGanZhiExact 未返回所需的值。");
        }

19 Source : HolidayUtilTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void testFix()
        {
            replacedert.AreEqual("2020-01-01 元旦节 2020-01-01", HolidayUtil.getHoliday("2020-01-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");

            // 将2020-01-01修改为春节
            HolidayUtil.fix("202001011120200101");
            replacedert.AreEqual("2020-01-01 春节 2020-01-01", HolidayUtil.getHoliday("2020-01-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");

            // 追加2099-01-01为元旦节
            HolidayUtil.fix("209901010120990101");
            replacedert.AreEqual("2099-01-01 元旦节 2099-01-01", HolidayUtil.getHoliday("2099-01-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");

            // 将2020-01-01修改为春节,并追加2099-01-01为元旦节
            HolidayUtil.fix("202001011120200101209901010120990101");
            replacedert.AreEqual("2020-01-01 春节 2020-01-01", HolidayUtil.getHoliday("2020-01-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");
            replacedert.AreEqual("2099-01-01 元旦节 2099-01-01", HolidayUtil.getHoliday("2099-01-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");

            // 更改节假日名称
            string[] names = HolidayUtil.NAMES;
            names[0] = "元旦";
            names[1] = "大年初一";

            HolidayUtil.fix(names, null);
            replacedert.AreEqual("2020-01-01 大年初一 2020-01-01", HolidayUtil.getHoliday("2020-01-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");
            replacedert.AreEqual("2099-01-01 元旦 2099-01-01", HolidayUtil.getHoliday("2099-01-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");

            // 追加节假日名称和数据
            names = new string[12];
            for (int i = 0, j = HolidayUtil.NAMES.Length; i < j; i++)
            {
                names[i] = HolidayUtil.NAMES[i];
            }
            names[9] = "我的生日";
            names[10] = "结婚纪念日";
            names[11] = "她的生日";

            HolidayUtil.fix(names, "20210529912021052920211111:12021111120211201;120211201");
            replacedert.AreEqual("2021-05-29 我的生日 2021-05-29", HolidayUtil.getHoliday("2021-05-29") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");
            replacedert.AreEqual("2021-11-11 结婚纪念日 2021-11-11", HolidayUtil.getHoliday("2021-11-11") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");
            replacedert.AreEqual("2021-12-01 她的生日 2021-12-01", HolidayUtil.getHoliday("2021-12-01") + "", "com.nlf.calendar.util.HolidayUtil.fix 有错。");

        }

19 Source : LiuYaoTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test6()
        {
            Solar solar = new Solar(2020, 6, 1);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("先胜", lunar.getLiuYao(), lunar.toString());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test1()
        {
            Solar solar = Solar.fromYmdHms(2021, 6, 7, 21, 18, 0);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("二〇二一年四月廿七", lunar.ToString(), "com.nlf.calendar.Solar.getLunar 有错。");
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test2()
        {
            Lunar lunar = Lunar.fromYmdHms(2021, 6, 7, 21, 18, 0);
            Solar solar = lunar.getSolar();
            replacedert.AreEqual("2021-07-16", solar.ToString(), "com.nlf.calendar.Lunar.getSolar 有错。");
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test038()
        {
            Lunar lunar = Lunar.fromYmd(7013, -11, 4);
            Solar solar = lunar.getSolar();
            replacedert.AreEqual("7013-12-24", solar.ToString(), "com.nlf.calendar.Lunar.getSolar 有错。");
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test041()
        {
            Solar solar = Solar.fromYmd(4, 2, 10);
            replacedert.AreEqual("鼠", solar.getLunar().getYearShengXiao(), "com.nlf.calendar.Lunar.getYearShengXiao 有错。");
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test042()
        {
            Solar solar = Solar.fromYmd(4, 2, 9);
            replacedert.AreEqual("猪", solar.getLunar().getYearShengXiao(), "com.nlf.calendar.Lunar.getYearShengXiao 有错。");
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test026()
        {
            Lunar lunar = Lunar.fromYmdHms(2021, 6, 7, 21, 18, 0);
            replacedert.AreEqual("2021-07-16", lunar.getSolar().toString());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test030()
        {
            Solar solar = Solar.fromYmd(1990, 10, 8);
            replacedert.AreEqual("丙戌", solar.getLunar().getMonthInGanZhi());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test033()
        {
            Lunar lunar = Lunar.fromYmd(2033, 12, 1);
            replacedert.AreEqual("2034-01-20", lunar.getSolar().toString());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test034()
        {
            Lunar lunar = Lunar.fromYmd(37, -12, 1);
            replacedert.AreEqual("闰腊", lunar.getMonthInChinese());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test035()
        {
            Lunar lunar = Lunar.fromYmd(56, -12, 1);
            replacedert.AreEqual("闰腊", lunar.getMonthInChinese());

            lunar = Lunar.fromYmd(75, -11, 1);
            replacedert.AreEqual("闰冬", lunar.getMonthInChinese());

            lunar = Lunar.fromYmd(94, -11, 1);
            replacedert.AreEqual("闰冬", lunar.getMonthInChinese());

            lunar = Lunar.fromYmd(94, 12, 1);
            replacedert.AreEqual("腊", lunar.getMonthInChinese());

            lunar = Lunar.fromYmd(113, 12, 1);
            replacedert.AreEqual("腊", lunar.getMonthInChinese());

            lunar = Lunar.fromYmd(113, -12, 1);
            replacedert.AreEqual("闰腊", lunar.getMonthInChinese());

            lunar = Lunar.fromYmd(5552, -12, 1);
            replacedert.AreEqual("闰腊", lunar.getMonthInChinese());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test036()
        {
            Solar solar = Solar.fromYmd(5553, 1, 22);
            replacedert.AreEqual("五五五二年闰腊月初二", solar.getLunar().toString());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test037()
        {
            Solar solar = Solar.fromYmd(7013, 12, 24);
            replacedert.AreEqual("七〇一三年闰冬月初四", solar.getLunar().toString());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test35()
        {
            Lunar lunar = Lunar.fromYmd(2021, 12, 29);
            replacedert.AreEqual("除夕", lunar.getFestivals()[0]);
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test36()
        {
            Lunar lunar = Lunar.fromYmd(2020, 12, 30);
            replacedert.AreEqual("除夕", lunar.getFestivals()[0]);
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test022()
        {
            Solar solar = Solar.fromYmd(2012, 12, 27);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("壬辰", lunar.getYearInGanZhi());
            replacedert.AreEqual("壬子", lunar.getMonthInGanZhi());
            replacedert.AreEqual("壬戌", lunar.getDayInGanZhi());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test023()
        {
            Solar solar = Solar.fromYmd(2012, 12, 20);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("壬辰", lunar.getYearInGanZhi());
            replacedert.AreEqual("壬子", lunar.getMonthInGanZhi());
            replacedert.AreEqual("乙卯", lunar.getDayInGanZhi());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test48()
        {
            Solar solar = Solar.fromYmd(2021, 11, 13);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("碓磨厕 外东南", lunar.getDayPositionTai());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test51()
        {
            Solar solar = Solar.fromYmd(2021, 11, 12);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("正北", lunar.getDayPositionFuDesc());
        }

19 Source : LunarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test52()
        {
            Solar solar = Solar.fromYmd(2011, 11, 12);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("厕灶厨 外西南", lunar.getDayPositionTai());
        }

19 Source : ShuJiuTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test1()
        {
            Solar solar = new Solar(2020, 12, 21);
            Lunar lunar = solar.getLunar();
            ShuJiu shuJiu = lunar.getShuJiu();
            replacedert.AreEqual("一九", shuJiu.toString(), solar.toYmd());
            replacedert.AreEqual("一九第1天", shuJiu.toFullString(), solar.toYmd());
        }

19 Source : ShuJiuTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test3()
        {
            Solar solar = new Solar(2020, 1, 7);
            Lunar lunar = solar.getLunar();
            ShuJiu shuJiu = lunar.getShuJiu();
            replacedert.AreEqual("二九", shuJiu.toString(), solar.toYmd());
            replacedert.AreEqual("二九第8天", shuJiu.toFullString(), solar.toYmd());
        }

19 Source : SolarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void testConvert()
        {
            Solar solar = new Solar(2020, 1, 23);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("二〇一九年腊月廿九", lunar.ToString(), "com.nlf.calendar.Solar.getLunar 有错。");
            replacedert.AreEqual("2020-01-23", lunar.getSolar().ToString(), "com.nlf.calendar.Lunar.getSolar 有错。");
        }

19 Source : SolarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void testConvert1()
        {
            Lunar lunar = new Lunar(2019, 12, 29);
            replacedert.AreEqual("二〇一九年腊月廿九", lunar.ToString(), "com.nlf.calendar.Solar.getLunar 有错。");
            replacedert.AreEqual("2020-01-23", lunar.getSolar().ToString(), "com.nlf.calendar.Lunar.getSolar 有错。");
        }

19 Source : SolarTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test9()
        {
            Solar solar = Solar.fromYmd(26, 4, 13);
            replacedert.AreEqual("二六年三月初八", solar.getLunar().ToString());
        }

19 Source : WuHouTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test6()
        {
            Solar solar = new Solar(2020, 6, 1);
            Lunar lunar = solar.getLunar();
            replacedert.AreEqual("麦秋至", lunar.getWuHou(), solar.toString());
        }

19 Source : XingZuoTest.cs
with MIT License
from 6tail

[TestMethod()]
        public void test10()
        {
            Solar solar = new Solar(2020, 12, 22);
            replacedert.AreEqual("摩羯", solar.getXingZuo(), solar.toYmd());
            solar = new Solar(2021, 1, 19);
            replacedert.AreEqual("摩羯", solar.getXingZuo(), solar.toYmd());
        }

See More Examples