public void Contains_Default_ReturnsFalse() { var attributeCollection = new SubAttributeCollection(); Assert.False(attributeCollection.Contains(new ReadOnlyAttribute(true))); Assert.False(attributeCollection.Contains(new Attribute[] { new ReadOnlyAttribute(true) })); }
public void Contains_InvokeAttributeEmpty_ReturnsExpected() { var collection = new SubAttributeCollection(); Assert.False(collection.Contains(new BrowsableAttribute(false))); Assert.False(collection.Contains((Attribute)null)); }
public void Contains_InvokeAttributesEmpty_ReturnsExpected() { var collection = new SubAttributeCollection(); Assert.False(collection.Contains(new Attribute[] { new BrowsableAttribute(false) })); Assert.False(collection.Contains(new Attribute[] { null })); Assert.True(collection.Contains(new Attribute[0])); Assert.True(collection.Contains((Attribute[])null)); }
public void Contains_Default_ReturnsFalse() { var attributeCollection = new SubAttributeCollection(); if (!PlatformDetection.IsFullFramework) { Assert.False(attributeCollection.Contains(new ReadOnlyAttribute(true))); Assert.False(attributeCollection.Contains(new Attribute[] { new ReadOnlyAttribute(true) })); } else { Assert.Throws <NullReferenceException>(() => attributeCollection.Contains(new ReadOnlyAttribute(true))); Assert.Throws <NullReferenceException>(() => attributeCollection.Contains(new Attribute[] { new ReadOnlyAttribute(true) })); } }