コード例 #1
0
        public void AddPlacesFilterInGlobalScope() {
            // Arrange
            var filterInstance = new object();
            var collection = new GlobalFilterCollection();

            // Act
            collection.Add(filterInstance);

            // Assert
            Filter filter = collection.Single();
            Assert.AreSame(filterInstance, filter.Instance);
            Assert.AreEqual(FilterScope.Global, filter.Scope);
            Assert.AreEqual(-1, filter.Order);
        }
コード例 #2
0
        public void AddPlacesFilterInGlobalScope()
        {
            // Arrange
            var filterInstance = new object();
            var collection     = new GlobalFilterCollection();

            // Act
            collection.Add(filterInstance);

            // Assert
            Filter filter = collection.Single();

            Assert.AreSame(filterInstance, filter.Instance);
            Assert.AreEqual(FilterScope.Global, filter.Scope);
            Assert.AreEqual(-1, filter.Order);
        }