Пример #1
0
        public void DeleteJavaOne_ShouldNotExistInDb()
        {
            var result = _activityManager.DeleteActivityById(2);

            Assert.AreEqual(true, result);
            Assert.AreEqual(null, _activityManager.GetActivityById(2));
        }
Пример #2
0
        public void UseCase2_RemoveAllActivities_ShouldDeleteAllSessionParticipants()
        {
            // 1. DELETE ALL ACTIVITIES
            _activityManager.DeleteActivityById(1);
            _activityManager.DeleteActivityById(2);
            _activityManager.DeleteActivityById(3);
            _activityManager.DeleteActivityById(4);
            _activityManager.DeleteActivityById(5);

            // 2. GET THE COUNT FOR SESSIONPARTICIPANTS
            var resultCount = _personManager.GetAllSessionParticipants().Count();

            var expectedCount = 0;

            Assert.AreEqual(expectedCount, resultCount);
        }
Пример #3
0
        public ActionResult DeleteActivity(int activityId)
        {
            if (!_activityManager.DeleteActivityById(activityId))
            {
                return(new HttpNotFoundResult());
            }

            var result = new { Success = "True" };

            return(Json(result, JsonRequestBehavior.AllowGet));
        }