Ejemplo n.º 1
0
        public void TestIfPastAppealCanBeAdded()
        {
            AgileWorksWebAppealsDBEntities agileWorksWebAppealsDBEntities = new AgileWorksWebAppealsDBEntities();

            Appeals appeals = new Appeals();

            appeals.deadlineDatetime = new DateTime(1996, 1, 19);
            appeals.entryDatetime    = DateTime.Now;
            appeals.description      = "Test123456123456789";

            AppealsController appealsController = new AppealsController();

            var result = appealsController.Create(appeals);
        }
Ejemplo n.º 2
0
        public void TestIfFutureAppealExists()
        {
            AgileWorksWebAppealsDBEntities agileWorksWebAppealsDBEntities = new AgileWorksWebAppealsDBEntities();

            Appeals appeals = new Appeals();

            appeals.deadlineDatetime = new DateTime(2020, 1, 19);
            appeals.entryDatetime    = DateTime.Now;
            appeals.description      = "Test123456123456789";

            AppealsController appealsController = new AppealsController();
            var result   = appealsController.Create(appeals);
            var ifExists = agileWorksWebAppealsDBEntities.Appeals.Where(x => x.appealId == appeals.appealId).FirstOrDefault();


            Assert.IsNotNull(ifExists);
            Assert.AreEqual(appeals.description, ifExists.description);
        }