public void EnumerableConverter_EnumerableModelEmptyList_Test()
        {
            var context = new DittoProcessorContext
            {
                PropertyInfo = typeof(WrappedModel).GetProperty("MyProperty3")
            };

            var processor = new EnumerableConverterAttribute();
            var result    = processor.ProcessValue(null, context);

            Assert.That(result, Is.Not.Null);
        }
예제 #2
0
        public void EnumerableConverter_EnumerableModelEmptyList_Test()
        {
            var context = new DittoProcessorContext
            {
                PropertyDescriptor = TypeDescriptor.GetProperties(new WrappedModel())["MyProperty3"]
            };

            var processor = new EnumerableConverterAttribute();
            var result    = processor.ProcessValue(null, context);

            Assert.That(result, Is.Not.Null);
        }
        public void EnumerableConverter_InheritedEnumerableModel_Test()
        {
            var context = new DittoProcessorContext
            {
                PropertyInfo = typeof(WrappedModel).GetProperty("MyProperty2")
            };

            var processor = new EnumerableConverterAttribute();
            var result    = processor.ProcessValue(null, context);

            // The value should be null since we don't have an empty constructor.
            Assert.That(result, Is.Null);
        }