Exemplo n.º 1
0
        public void GenericRemoveType_RemovesAllOfType()
        {
            // Arrange
            var collection = new PageConventionCollection(Mock.Of <IServiceProvider>())
            {
                new FooPageConvention(),
                new BarPageConvention(),
                new FooPageConvention()
            };

            // Act
            collection.RemoveType <FooPageConvention>();

            // Assert
            Assert.Collection(
                collection,
                convention => Assert.IsType <BarPageConvention>(convention));
        }
Exemplo n.º 2
0
        public void RemoveType_RemovesAllOfType()
        {
            // Arrange
            var collection = new PageConventionCollection
            {
                new FooPageConvention(),
                new BarPageConvention(),
                new FooPageConvention()
            };

            // Act
            collection.RemoveType(typeof(FooPageConvention));

            // Assert
            Assert.Collection(
                collection,
                convention => Assert.IsType <BarPageConvention>(convention));
        }