public void SetUp()
        {
            _registry = new ValueConverterRegistry(new IConverterFamily[0]);
            _property = typeof(PropertyHolder).GetProperty("Property");
            _basicTypeConverter = _registry.Families.SingleOrDefault(cf =>
                cf.Matches(_property)) as BasicTypeConverter;
            _basicTypeConverter.ShouldNotBeNull();

            _context = MockRepository.GenerateMock<IBindingContext>();
            _propertyValue = "some value";
            _context.Expect(c => c.PropertyValue).Return(_propertyValue).Repeat.Times(3);
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            _registry          = new ValueConverterRegistry(new IConverterFamily[0]);
            _property          = typeof(PropertyHolder).GetProperty("Property");
            _numericTypeFamily = _registry.Families.FirstOrDefault(cf =>
                                                                   cf.Matches(_property)) as NumericTypeFamily;
            _numericTypeFamily.ShouldNotBeNull();

            _context       = MockRepository.GenerateMock <IBindingContext>();
            _propertyValue = "1.000,001";
            _context.Expect(c => c.PropertyValue).Return(_propertyValue).Repeat.Times(4);
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            _registry           = new ValueConverterRegistry(new IConverterFamily[0]);
            _property           = typeof(PropertyHolder).GetProperty("Property");
            _basicTypeConverter = _registry.Families.SingleOrDefault(cf =>
                                                                     cf.Matches(_property)) as BasicTypeConverter;
            _basicTypeConverter.ShouldNotBeNull();

            _context       = MockRepository.GenerateMock <IBindingContext>();
            _propertyValue = "some value";
            _context.Expect(c => c.PropertyValue).Return(_propertyValue).Repeat.Times(3);
        }
        public void SetUp()
        {
            _registry = new ValueConverterRegistry(new IConverterFamily[0]);
            _property = typeof(PropertyHolder).GetProperty("Property");
            _numericTypeFamily = _registry.Families.FirstOrDefault(cf =>
                cf.Matches(_property)) as NumericTypeFamily;
            _numericTypeFamily.ShouldNotBeNull();

            _context = MockRepository.GenerateMock<IBindingContext>();
            _propertyValue = "1.000,001";
            _context.Expect(c => c.PropertyValue).Return(_propertyValue).Repeat.Times(4);
        }