Esempio n. 1
0
        public void DefaultDateTest_return_runingDateValue_POP()
        {
            //Arrange
            string          action    = "DefaultDate";
            SearchParameter parameter = new SearchParameter()
            {
                Operate      = action,
                SchoolYear   = "20192020",
                PositionType = "POP"
            };

            // Act
            var myDate      = GeneralExe.DefaultDate(parameter)[0];
            var startDate   = myDate.StartDate;
            var endDate     = myDate.EndDate;
            var publishDate = myDate.DatePublish;
            var openDate    = myDate.DateApplyOpen;
            var closeDate   = myDate.DateApplyClose;

            string expect = DateFC.YMD(DateTime.Now);
            string result = DateFC.YMD(publishDate);

            //Assert
            Assert.AreEqual(expect, result, $"default publish Date Value  { result}");
        }
Esempio n. 2
0
        public void DefaultDateTest_return_runingDateValue_LTO()
        {
            //Arrange
            string          action    = "DefaultDate";
            SearchParameter parameter = new SearchParameter()
            {
                Operate      = action,
                SchoolYear   = "20192020",
                PositionType = "LTO"
            };


            // Act
            var myGridview = new System.Web.UI.WebControls.GridView();


            var myDate = GeneralExe.DefaultDate(parameter)[0];
            //myGridview.AutoGenerateColumns = true;
            //myGridview.DataSource = myDatasource;
            //myGridview.DataBind();

            var startDate   = myDate.StartDate;
            var endDate     = myDate.EndDate;
            var publishDate = myDate.DatePublish;
            var openDate    = myDate.DateApplyOpen;
            var closeDate   = myDate.DateApplyClose;

            string expect = DateFC.YMD(DateTime.Now);
            string result = DateFC.YMD(publishDate);

            //Assert
            Assert.AreEqual(expect, result, $"default publish Date Value  { result}");
        }