public void ValidateDateTest_Return_NextAvailable_WorkDay_whenPublicHailday_20191225() { //Arrange var checkDate = new { Operate = "NextWorkDay", SchoolYear = "20192020", PositionType = "LTO", ValidateDate = "2019/12/25" }; //Act string expect = "2020/01/06"; string result = GeneralExe.ValidateDate(checkDate); //Assert Assert.AreEqual(expect, result, $" Next work day is { result } for { checkDate.ValidateDate} is a Invaildate date. "); }
public void ValidateDateTest_Return_NextAvailable_WorkDay_whenWeekends_20191109() { //Arrange var checkDate = new { Operate = "NextWorkDay", SchoolYear = "20192020", PositionType = "LTO", ValidateDate = "2019/11/09" }; //Act string expect = "2019/11/11"; string result = GeneralExe.ValidateDate(checkDate); //Assert Assert.AreEqual(expect, result, $" Next work day is { result } for { checkDate.ValidateDate}"); }
public void ValidateDateTest_Return_InVaildate_whenPublicHailday2_20191225() { //Arrange var checkDate = new { Operate = "Check", SchoolYear = "20192020", PositionType = "LTO", ValidateDate = "2019/12/25" }; //Act string expect = "Invalid Date"; string result = GeneralExe.ValidateDate(checkDate); //Assert Assert.AreEqual(expect, result, $" { checkDate.ValidateDate} is a Invaildate date. "); }
public void ValidateDateTest_Return_NextAvailable_WorkDaye_20191111() { //Arrange var checkDate = new { Operate = "Check", SchoolYear = "20192020", PositionType = "LTO", ValidateDate = "2019/11/11" }; //Act string expect = checkDate.ValidateDate; string result = GeneralExe.ValidateDate(checkDate); //Assert Assert.AreEqual(expect, result, $" { result } is a next available work date for { checkDate.ValidateDate } . "); }