示例#1
0
            public void Registers_EnforceHttpsAttribute()
            {
                var filters = new GlobalFilterCollection();
                MvcApplication.RegisterGlobalFilters(filters);

                filters.ShouldNotBeNull();
                filters.Count.ShouldBeInRange(1, int.MaxValue);

                var expectedFilter = filters.SingleOrDefault(filter =>
                    typeof(EnforceHttpsAttribute) == filter.Instance.GetType());
                expectedFilter.ShouldNotBeNull();
            }
示例#2
0
            public void Registers_EnforceHttpsAttribute()
            {
                var filters = new GlobalFilterCollection();

                MvcApplication.RegisterGlobalFilters(filters);

                filters.ShouldNotBeNull();
                filters.Count.ShouldBeInRange(1, int.MaxValue);

                var expectedFilter = filters.SingleOrDefault(filter =>
                                                             typeof(EnforceHttpsAttribute) == filter.Instance.GetType());

                expectedFilter.ShouldNotBeNull();
            }