Exemplo n.º 1
0
        public void SetUp()
        {
            _registry          = new BindingRegistry();
            _property          = typeof(PropertyHolder).GetProperty("Property");
            _numericTypeFamily = _registry.AllConverterFamilies().FirstOrDefault(cf =>
                                                                                 cf.Matches(_property)) as NumericTypeFamily;
            _numericTypeFamily.ShouldNotBeNull();

            _context = MockRepository.GenerateMock <IPropertyContext>();
            _context.Stub(x => x.Property).Return(_property);
            _propertyValue = new BindingValue {
                RawValue = "1.000,001"
            };
            _context.Expect(c => c.RawValueFromRequest).Return(_propertyValue).Repeat.Times(4);
        }
Exemplo n.º 2
0
 public void the_list_has_a_description_for_each_conversion_family()
 {
     theConversionList.Children.Select(x => x.TargetType)
     .ShouldHaveTheSameElementsAs(theRegistry.AllConverterFamilies().Select(x => x.GetType()));
 }