コード例 #1
0
        public void It_Should_Register_A_Filter()
        {
            // Arrange
            const string   key            = "upcase";
            FilterRegistry filterRegistry = new FilterRegistry();

            // Act
            filterRegistry.Register <UpCaseFilter>(key);
            var filterType = filterRegistry.Find(key);

            // Assert
            Assert.Equal(typeof(UpCaseFilter), filterType);
        }
コード例 #2
0
        public void It_Should_Register_A_Filter()
        {
            // Arrange
            const string key = "upcase";
            FilterRegistry filterRegistry = new FilterRegistry();

            // Act
            filterRegistry.Register<UpCaseFilter>(key);
            var filterType = filterRegistry.Find(key);

            // Assert
            Assert.That(filterType, Is.EqualTo(typeof(UpCaseFilter)));

        }
コード例 #3
0
 public Type ReferenceFilter(String key)
 {
     return(_filterRegistry.Find(key));
 }