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
19
Source : YunTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test1()
{
Solar solar = Solar.fromYmdHms(1981, 1, 29, 23, 37, 0);
Lunar lunar = solar.getLunar();
EightChar eightChar = lunar.getEightChar();
Yun yun = eightChar.getYun(0);
replacedert.AreEqual(8, yun.getStartYear(), "起运年数");
replacedert.AreEqual(0, yun.getStartMonth(), "起运月数");
replacedert.AreEqual(20, yun.getStartDay(), "起运天数");
replacedert.AreEqual("1989-02-18", yun.getStartSolar().toYmd(), "起运阳历");
}
19
Source : YunTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test2()
{
Lunar lunar = Lunar.fromYmdHms(2019, 12, 12, 11, 22, 0);
EightChar eightChar = lunar.getEightChar();
Yun yun = eightChar.getYun(1);
replacedert.AreEqual(0, yun.getStartYear(), "起运年数");
replacedert.AreEqual(1, yun.getStartMonth(), "起运月数");
replacedert.AreEqual(0, yun.getStartDay(), "起运天数");
replacedert.AreEqual("2020-02-06", yun.getStartSolar().toYmd(), "起运阳历");
}
19
Source : YunTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test3()
{
Solar solar = Solar.fromYmdHms(2020, 1, 6, 11, 22, 0);
Lunar lunar = solar.getLunar();
EightChar eightChar = lunar.getEightChar();
Yun yun = eightChar.getYun(1);
replacedert.AreEqual(0, yun.getStartYear(), "起运年数");
replacedert.AreEqual(1, yun.getStartMonth(), "起运月数");
replacedert.AreEqual(0, yun.getStartDay(), "起运天数");
replacedert.AreEqual("2020-02-06", yun.getStartSolar().toYmd(), "起运阳历");
}
19
Source : BaZiTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void testLiuYue()
{
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();
String[] ganZhi = { "甲寅", "乙卯", "丙辰", "丁巳", "戊午", "己未", "庚申", "辛酉", "壬戌", "癸亥", "甲子", "乙丑" };
LiuNian[] liuNian = daYun[0].getLiuNian();
LiuYue[] l = liuNian[0].getLiuYue();
for (int i = 0, j = l.Length; i < j; i++)
{
LiuYue liuYue = l[i];
replacedert.AreEqual(ganZhi[i], liuYue.getGanZhi());
}
ganZhi = new String[] { "庚寅", "辛卯", "壬辰", "癸巳", "甲午", "乙未", "丙申", "丁酉", "戊戌", "己亥", "庚子", "辛丑" };
liuNian = daYun[4].getLiuNian();
l = liuNian[2].getLiuYue();
for (int i = 0, j = l.Length; i < j; i++)
{
LiuYue liuYue = l[i];
replacedert.AreEqual(ganZhi[i], liuYue.getGanZhi());
}
}
19
Source : FotoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test()
{
Foto foto = Foto.fromLunar(Lunar.fromYmd(2021, 10, 14));
replacedert.AreEqual("二五六五年十月十四 (三元降 犯者减寿) (四天王巡行)", foto.toFullString());
}
19
Source : FuTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test2()
{
Solar solar = new Solar(2011, 7, 23);
Lunar lunar = solar.getLunar();
Fu fu = lunar.getFu();
replacedert.AreEqual("初伏", fu.toString(), solar.toYmd());
replacedert.AreEqual("初伏第10天", fu.toFullString(), solar.toYmd());
}
19
Source : FuTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test12()
{
Solar solar = new Solar(2020, 7, 17);
Lunar lunar = solar.getLunar();
Fu fu = lunar.getFu();
replacedert.AreEqual("初伏", fu.toString(), solar.toYmd());
replacedert.AreEqual("初伏第2天", fu.toFullString(), solar.toYmd());
}
19
Source : GanZhiTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test4()
{
int year = 2020;
int month = 1;
int day = 25;
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 : LiuYaoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test1()
{
Solar solar = new Solar(2020, 4, 23);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("佛灭", lunar.getLiuYao(),lunar.toString());
}
19
Source : LiuYaoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test2()
{
Solar solar = new Solar(2021, 1, 15);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("友引", lunar.getLiuYao(), lunar.toString());
}
19
Source : LiuYaoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test3()
{
Solar solar = new Solar(2017, 1, 5);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("先胜", lunar.getLiuYao(), lunar.toString());
}
19
Source : LiuYaoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test4()
{
Solar solar = new Solar(2020, 4, 10);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("友引", lunar.getLiuYao(), lunar.toString());
}
19
Source : LiuYaoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test5()
{
Solar solar = new Solar(2020, 6, 11);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("大安", lunar.getLiuYao(), lunar.toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test22()
{
Lunar lunar = Lunar.fromYmd(2033, -11, 1);
replacedert.AreEqual("2033-12-22", lunar.getSolar().toYmd());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test24()
{
Lunar lunar = Lunar.fromYmd(2033, 1, 1);
replacedert.AreEqual("三碧木天玑", lunar.getYearNineStar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test028()
{
Solar solar = Solar.fromYmd(1990, 10, 8);
replacedert.AreEqual("乙酉", solar.getLunar().getMonthInGanZhiExact());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test032()
{
Lunar lunar = Lunar.fromYmd(2034, 1, 1);
replacedert.AreEqual("2034-02-19", lunar.getSolar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test8()
{
Lunar lunar = Lunar.fromYmdHms(2020, 12, 10, 13, 0, 0);
replacedert.AreEqual("二〇二〇年腊月初十", lunar.toString());
replacedert.AreEqual("2021-01-22", lunar.getSolar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test9()
{
Lunar lunar = Lunar.fromYmdHms(1500, 1, 1, 12, 0, 0);
replacedert.AreEqual("1500-01-31", lunar.getSolar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test10()
{
Lunar lunar = Lunar.fromYmdHms(1500, 12, 29, 12, 0, 0);
replacedert.AreEqual("1501-01-18", lunar.getSolar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test11()
{
Solar solar = Solar.fromYmdHms(1500, 1, 1, 12, 0, 0);
replacedert.AreEqual("一四九九年腊月初一", solar.getLunar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test13()
{
Solar solar = Solar.fromYmdHms(1582, 10, 4, 12, 0, 0);
replacedert.AreEqual("一五八二年九月十八", solar.getLunar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test14()
{
Solar solar = Solar.fromYmdHms(1582, 10, 15, 12, 0, 0);
replacedert.AreEqual("一五八二年九月十九", solar.getLunar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test15()
{
Lunar lunar = Lunar.fromYmdHms(1582, 9, 18, 12, 0, 0);
replacedert.AreEqual("1582-10-04", lunar.getSolar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test16()
{
Lunar lunar = Lunar.fromYmdHms(1582, 9, 19, 12, 0, 0);
replacedert.AreEqual("1582-10-15", lunar.getSolar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test17()
{
Lunar lunar = Lunar.fromYmdHms(2019, 12, 12, 11, 22, 0);
replacedert.AreEqual("2020-01-06", lunar.getSolar().toString());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test18()
{
Solar solar = Solar.fromYmdHms(2020, 2, 4, 13, 22, 0);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("庚子", lunar.getYearInGanZhi());
replacedert.AreEqual("庚子", lunar.getYearInGanZhiByLiChun());
replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact());
replacedert.AreEqual("戊寅", lunar.getMonthInGanZhi());
replacedert.AreEqual("丁丑", lunar.getMonthInGanZhiExact());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test19()
{
Solar solar = Solar.fromYmdHms(2019, 2, 8, 13, 22, 0);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("己亥", lunar.getYearInGanZhi());
replacedert.AreEqual("己亥", lunar.getYearInGanZhiByLiChun());
replacedert.AreEqual("己亥", lunar.getYearInGanZhiExact());
replacedert.AreEqual("丙寅", lunar.getMonthInGanZhi());
replacedert.AreEqual("丙寅", lunar.getMonthInGanZhiExact());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test024()
{
Solar solar = Solar.fromYmd(2012, 11, 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
with MIT License
from 6tail
[TestMethod()]
public void test25()
{
Solar solar = Solar.fromYmd(2012, 10, 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
with MIT License
from 6tail
[TestMethod()]
public void test26()
{
Solar solar = Solar.fromYmd(2012, 9, 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
with MIT License
from 6tail
[TestMethod()]
public void test126()
{
Solar solar = Solar.fromYmd(2012, 8, 5);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("戊戌", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test27()
{
Solar solar = Solar.fromYmd(2000, 2, 2);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("庚寅", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test28()
{
Solar solar = Solar.fromYmd(1996, 1, 16);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("壬子", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test29()
{
Solar solar = Solar.fromYmd(1997, 2, 16);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("己丑", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test30()
{
Solar solar = Solar.fromYmd(1998, 3, 16);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("壬戌", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test31()
{
Solar solar = Solar.fromYmd(1999, 4, 16);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("戊戌", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test32()
{
Solar solar = Solar.fromYmd(2000, 7, 16);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("乙亥", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test33()
{
Solar solar = Solar.fromYmd(2000, 1, 6);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("癸亥", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test34()
{
Solar solar = Solar.fromYmd(2000, 1, 9);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("丙寅", lunar.getDayInGanZhi());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test45()
{
Solar solar = Solar.fromYmd(2017, 2, 15);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("子命互禄 辛命进禄", lunar.getDayLu());
}
19
Source : LunarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test46()
{
Solar solar = Solar.fromYmd(2017, 2, 16);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("寅命互禄", lunar.getDayLu());
}
19
Source : ShuJiuTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test4()
{
Solar solar = new Solar(2021, 1, 6);
Lunar lunar = solar.getLunar();
ShuJiu shuJiu = lunar.getShuJiu();
replacedert.AreEqual("二九", shuJiu.toString(), solar.toYmd());
replacedert.AreEqual("二九第8天", shuJiu.toFullString(), solar.toYmd());
}
19
Source : ShuJiuTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test5()
{
Solar solar = new Solar(2021, 1, 8);
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
with MIT License
from 6tail
[TestMethod()]
public void test6()
{
Solar solar = new Solar(2021, 3, 5);
Lunar lunar = solar.getLunar();
ShuJiu shuJiu = lunar.getShuJiu();
replacedert.AreEqual("九九", shuJiu.toString(), solar.toYmd());
replacedert.AreEqual("九九第3天", shuJiu.toFullString(), solar.toYmd());
}
19
Source : SolarTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void testNext()
{
Solar date = new Solar(2020, 1, 23);
replacedert.AreEqual("2020-01-24", date.next(1).ToString(), "com.nlf.calendar.Solar.next 有错。");
// 仅工作日,跨越春节假期
replacedert.AreEqual("2020-02-03", date.next(1, true).ToString(), "com.nlf.calendar.Solar.next 有错。");
date = new Solar(2020, 2, 3);
replacedert.AreEqual("2020-01-31", date.next(-3).ToString(), "com.nlf.calendar.Solar.next 有错。");
// 仅工作日,跨越春节假期
replacedert.AreEqual("2020-01-21", date.next(-3, true).ToString(), "com.nlf.calendar.Solar.next 有错。");
date = new Solar(2020, 2, 9);
replacedert.AreEqual("2020-02-15", date.next(6).ToString(), "com.nlf.calendar.Solar.next 有错。");
// 仅工作日,跨越周末
replacedert.AreEqual("2020-02-17", date.next(6, true).ToString(), "com.nlf.calendar.Solar.next 有错。");
date = new Solar(2020, 1, 17);
replacedert.AreEqual("2020-01-18", date.next(1).ToString(), "com.nlf.calendar.Solar.next 有错。");
// 仅工作日,周日调休按上班算
replacedert.AreEqual("2020-01-19", date.next(1, true).ToString(), "com.nlf.calendar.Solar.next 有错。");
}
19
Source : WuHouTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test7()
{
Solar solar = new Solar(2020, 12, 8);
Lunar lunar = solar.getLunar();
replacedert.AreEqual("鹖鴠不鸣", lunar.getWuHou(), solar.toString());
}
19
Source : XingZuoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test1()
{
Solar solar = new Solar(2020, 3, 21);
replacedert.AreEqual("白羊", solar.getXingZuo(), solar.toYmd());
solar = new Solar(2020, 4, 19);
replacedert.AreEqual("白羊", solar.getXingZuo(), solar.toYmd());
}
19
Source : XingZuoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test2()
{
Solar solar = new Solar(2020, 4, 20);
replacedert.AreEqual("金牛", solar.getXingZuo(), solar.toYmd());
solar = new Solar(2020, 5, 20);
replacedert.AreEqual("金牛", solar.getXingZuo(), solar.toYmd());
}
19
Source : XingZuoTest.cs
with MIT License
from 6tail
with MIT License
from 6tail
[TestMethod()]
public void test3()
{
Solar solar = new Solar(2020, 5, 21);
replacedert.AreEqual("双子", solar.getXingZuo(), solar.toYmd());
solar = new Solar(2020, 6, 21);
replacedert.AreEqual("双子", solar.getXingZuo(), solar.toYmd());
}
See More Examples