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); }
public void SetUp() { _registry = new ValueConverterRegistry(new IConverterFamily[0], new ConverterLibrary()); _property = typeof (PropertyHolder).GetProperty("Property"); _numericTypeFamily = _registry.Families.FirstOrDefault(cf => cf.Matches(_property)) as NumericTypeFamily; _numericTypeFamily.ShouldNotBeNull(); _context = MockRepository.GenerateMock<IPropertyContext>(); _context.Stub(x => x.Property).Return(_property); _propertyValue = "1,000.001"; _context.Expect(c => c.PropertyValue).Return(_propertyValue).Repeat.Times(4); }