public void PropertyTab_Bitmap_GetInvalidMultipleTimes_ReturnsNull() { var tab = new SubPropertyTab(); Assert.Null(tab.Bitmap); Assert.Null(tab.Bitmap); }
public void PropertyTab_Ctor_Default() { var tab = new SubPropertyTab(); Assert.Null(tab.Bitmap); Assert.Null(tab.Components); Assert.Equal("TabName", tab.HelpKeyword); }
public void PropertyTab_Dispose_NoBitmapDisposing_Success(bool disposing) { var tab = new SubPropertyTab(); tab.Dispose(disposing); Assert.Null(tab.Bitmap); // Dispose again. tab.Dispose(disposing); Assert.Null(tab.Bitmap); }
public void PropertyTab_GetProperties_InvokeWithAttributes_ReturnsExpected(ITypeDescriptorContext context, object component, Attribute[] attributes) { var tab = new SubPropertyTab(); PropertyDescriptorCollection result = TypeDescriptor.GetProperties(typeof(ClassWithDefaultProperty)); int callCount = 0; tab.GetPropertiesAction = (componentResult, attributesResult) => { Assert.Same(component, componentResult); Assert.Same(attributes, attributesResult); callCount++; return(result); }; Assert.Same(result, tab.GetProperties(context, component, attributes)); Assert.Equal(1, callCount); }
public void PropertyTab_CanExtend_Invoke_ReturnsTrue(object extendee) { var tab = new SubPropertyTab(); Assert.True(tab.CanExtend(extendee)); }
public void PropertyTab_GetDefaultProperty_InvokeNullComponent_ReturnsExpected() { var tab = new SubPropertyTab(); Assert.Null(tab.GetDefaultProperty(null)); }
public void PropertyTab_GetDefaultProperty_InvokeWithDefaultProperty_ReturnsExpected() { var tab = new SubPropertyTab(); Assert.Equal("Value", tab.GetDefaultProperty(new ClassWithDefaultProperty()).Name); }
public void PropertyTab_GetDefaultProperty_InvokeWithoutDefaultProperty_ReturnsExpected() { var tab = new SubPropertyTab(); Assert.Null(tab.GetDefaultProperty(new ClassWithoutDefaultProperty())); }