public void Ctor_DesignersIList(IDesignerHost[] designers)
        {
            var collection = new DesignerCollection((IList)designers);

            Assert.Equal(designers?.Length ?? 0, collection.Count);
            Assert.Equal(designers ?? Enumerable.Empty <IDesignerHost>(), collection.Cast <IDesignerHost>());
        }
Exemplo n.º 2
0
        public void Ctor_DesignersIList(IDesignerHost[] designers)
        {
            var collection = new DesignerCollection((IList)designers);

            Assert.Equal(designers.Length, collection.Count);
            Assert.Equal(designers, collection.Cast <IDesignerHost>());
        }
        public void ICollection_PropertiesAndMethods_ReturnsExpected()
        {
            ICollection collection = new DesignerCollection(new TestDesignerHost[1]);

            Assert.Equal(1, collection.Count);
            Assert.Equal(1, collection.Cast <IDesignerHost>().Count());

            Assert.Null(collection.SyncRoot);
            Assert.False(collection.IsSynchronized);
        }