public void IBusinessObjectEnumerationProperty_GetAllValues() { IBusinessObjectEnumerationProperty property = CreateProperty("NullableScalar"); BooleanEnumerationValueInfo[] expected = new [] { new BooleanEnumerationValueInfo(true, (IBusinessObjectBooleanProperty)property), new BooleanEnumerationValueInfo(false, (IBusinessObjectBooleanProperty)property) }; CheckEnumerationValueInfos(expected, property.GetAllValues(null)); }
public void UndefinedValueEnum() { IBusinessObjectEnumerationProperty property = CreateProperty(typeof(ClassWithValueType <EnumWithUndefinedValue>), "Scalar"); EnumerationValueInfo[] expected = new[] { new EnumerationValueInfo(EnumWithUndefinedValue.Value1, "Value1", "Value1", true), new EnumerationValueInfo(EnumWithUndefinedValue.Value2, "Value2", "Value2", true), new EnumerationValueInfo(EnumWithUndefinedValue.Value3, "Value3", "Value3", true) }; CheckEnumerationValueInfos(expected, property.GetAllValues(null)); }
public void NullableEnum() { IBusinessObjectEnumerationProperty property = CreateProperty(typeof(ClassWithValueType <TestEnum>), "NullableScalar"); EnumerationValueInfo[] expected = new[] { new EnumerationValueInfo(TestEnum.Value1, "Value1", "Value1", true), new EnumerationValueInfo(TestEnum.Value2, "Value2", "Value2", true), new EnumerationValueInfo(TestEnum.Value3, "Value3", "Value3", true), new EnumerationValueInfo(TestEnum.Value4, "Value4", "Value4", true), new EnumerationValueInfo(TestEnum.Value5, "Value5", "Value5", false) }; CheckEnumerationValueInfos(expected, property.GetAllValues(null)); }