Exemplo n.º 1
0
        public void MessageAllVolunteersHasValidateAntiForgeryTokenAttribute()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.MessageAllVolunteers(It.IsAny <MessageTaskVolunteersViewModel>())).OfType <ValidateAntiForgeryTokenAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
        }
Exemplo n.º 2
0
        public void DeleteConfirmedHasValidateAntiForgeryTokenAttribute()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.DeleteConfirmed(It.IsAny <DeleteViewModel>())).OfType <ValidateAntiForgeryTokenAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
        }
Exemplo n.º 3
0
        public void AssignHasValidateAntiForgeryTokenAttribute()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.Assign(It.IsAny <int>(), It.IsAny <List <string> >())).OfType <ValidateAntiForgeryTokenAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
        }
Exemplo n.º 4
0
        public void DetailsHasHttpGetAttribute()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.Details(It.IsAny <int>())).OfType <HttpGetAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
        }
Exemplo n.º 5
0
        public void EditPostHasHttpPostAttribute()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.Edit(It.IsAny <EditViewModel>())).OfType <HttpPostAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
        }
Exemplo n.º 6
0
        public void DeleteConfirmedHasActionNameAttributeWithCorrectActionName()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.DeleteConfirmed(It.IsAny <DeleteViewModel>())).OfType <ActionNameAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
            Assert.Equal("Delete", attribute.Name);
        }
Exemplo n.º 7
0
        public void DetailsHasRouteAttributeWithCorrectTemplate()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.Details(It.IsAny <int>())).OfType <RouteAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
            Assert.Equal("Admin/VolunteerTask/Details/{id}", attribute.Template);
        }
        public void CreateGetHasRouteAttributeWithCorrectTemplate()
        {
            var sut       = new VolunteerTaskController(null, null);
            var attribute = sut.GetAttributesOn(x => x.Create(It.IsAny <int>())).OfType <RouteAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
            Assert.Equal(attribute.Template, "Admin/VolunteerTask/Create/{eventId}");
        }