public void DescribeComponent_IgnoreNonExtenderControlPropertyAndNonExtenderControlEvent() { var descriptorMock = new Mock <IScriptComponentDescriptor>(MockBehavior.Strict); ComponentDescriber.DescribeComponent(new Extender { PropWithNoAttributes = 123 }, descriptorMock.Object, null, null); }
public void DescribeComponent_DefaultProperty() { var descriptorMock = new Mock <IScriptComponentDescriptor>(MockBehavior.Strict); ComponentDescriber.DescribeComponent(new ExtenderWithNonDefaultValues { Prop = 999, EventProp = "BCD", ElementProp = "BCD", ComponentProp = "BCD" }, descriptorMock.Object, null, null); }
public void DescribeComponent_DoNotSerializeNullValue() { var descriptorMock = new Mock <IScriptComponentDescriptor>(MockBehavior.Strict); ComponentDescriber.DescribeComponent(new Extender { NullableProp = null }, descriptorMock.Object, null, null); }
public void DescribeComponent_PropertyName() { var descriptorMock = new Mock <IScriptComponentDescriptor>(); ComponentDescriber.DescribeComponent(new ExtenderWithNonDefaultValues { Prop = 123 }, descriptorMock.Object, null, null); descriptorMock.Verify(d => d.AddProperty("Prop", It.IsAny <object>()), Times.Once); }
public void DescribeComponent_DateTimeValue() { var descriptorMock = new Mock <IScriptComponentDescriptor>(); ComponentDescriber.DescribeComponent(new Extender { DateTimeProp = new DateTime(2000, 1, 2, 3, 4, 5, 6) }, descriptorMock.Object, null, null); descriptorMock.Verify(d => d.AddProperty("DateTimeProp", "2000-01-02T03:04:05"), Times.Once); }
public void DescribeComponent_ObjectValue() { var descriptorMock = new Mock <IScriptComponentDescriptor>(); ComponentDescriber.DescribeComponent(new Extender { ObjectProp = new TestObject() }, descriptorMock.Object, null, null); descriptorMock.Verify(d => d.AddProperty("ObjectProp", "TestObjectSerialized"), Times.Once); }
public void DescribeComponent_ComponentName() { var descriptorMock = new Mock <IScriptComponentDescriptor>(); ComponentDescriber.DescribeComponent(new ExtenderWithNonDefaultValues { ComponentProp = "ABC" }, descriptorMock.Object, null, null); descriptorMock.Verify(d => d.AddComponentProperty("ComponentProp", It.IsAny <string>()), Times.Once); }