Esempio n. 1
0
        public void DiscoverEvent()
        {
            EventController controller = new EventController();

            ViewResult result = controller.DiscoverEvent("abcd") as ViewResult;

            Assert.IsNotNull(result);
        }
Esempio n. 2
0
        public void CommentFromRadabite()
        {
            EventController controller = new EventController();

            PartialViewResult result = controller.CommentFromRadabite("1", "2", "2", "Message") as PartialViewResult;

            Assert.IsNotNull(result);
        }
Esempio n. 3
0
        public void DeleteEvent()
        {
            EventController controller = new EventController();

            var e = getNewEventModel();

            RedirectToRouteResult result = controller.Delete(e) as RedirectToRouteResult;

            Assert.IsNotNull(result);
        }
Esempio n. 4
0
        public void EventIndex()
        {
            EventController controller = new EventController();

            var mock = new Mock<ControllerContext>();
            mock.SetupGet(x => x.HttpContext.User.Identity.Name).Returns("Bob");
            mock.SetupGet(x => x.HttpContext.Request.IsAuthenticated).Returns(true);
            controller.ControllerContext = mock.Object;

            ViewResult result = controller.Index(123) as ViewResult;

            Assert.IsNotNull(result);
        }
Esempio n. 5
0
        public void CreateEvent()
        {
            var controller = new EventController();

            var e = getNewEventModel();

            var mock = new Mock<ControllerContext>();
            mock.SetupGet(x => x.HttpContext.User.Identity.Name).Returns("Bob");
            mock.SetupGet(x => x.HttpContext.Request.IsAuthenticated).Returns(true);
            controller.ControllerContext = mock.Object;

            RedirectToRouteResult result = controller.Create(e) as RedirectToRouteResult;

            Assert.IsNotNull(result);
        }
Esempio n. 6
0
        public void EventNotFound()
        {
            EventController controller = new EventController();

            ViewResult result = controller.EventNotFound() as ViewResult;

            Assert.IsNotNull(result);
        }
Esempio n. 7
0
        public void Vote()
        {
            EventController controller = new EventController();

            PartialViewResult result = controller.Vote("1", "Name", DateTime.Now.ToString()) as PartialViewResult;

            Assert.IsNotNull(result);
        }
Esempio n. 8
0
        public void RespondToInvitation()
        {
            EventController controller = new EventController();

            var friends = new List<String>
            {
                "1", "2", "3", "4"
            };

            PartialViewResult result = controller.RespondToInvitation("1", "2", "Accept") as PartialViewResult;

            Assert.IsNotNull(result);
        }
Esempio n. 9
0
        public void Invite()
        {
            EventController controller = new EventController();

            var friends = new List<String>
            {
                "1", "2", "3", "4"
            };

            var mock = new Mock<ControllerContext>();
            mock.SetupGet(x => x.HttpContext.User.Identity.Name).Returns("Bob");
            mock.SetupGet(x => x.HttpContext.Request.IsAuthenticated).Returns(true);
            controller.ControllerContext = mock.Object;

            PartialViewResult result = controller.Invite(friends, 1) as PartialViewResult;

            Assert.IsNotNull(result);
        }
Esempio n. 10
0
        public void GetImg()
        {
            EventController controller = new EventController();

            FileContentResult result = controller.GetImg("1485afb-d055-4f2f-a73e-c4e1bc22d2e9", "jpg") as FileContentResult;

            Assert.IsNotNull(result);
        }