Exemplo n.º 1
0
        public void MappingRangeDoubleProvider(IMapping map)
        {
            var providers = map.GetFieldsWithProviders;
            var result    = map.Range("Age", 20d, 40d);
            var provider  = providers.FirstOrDefault();

            Assert.Equal(map, result);
            Assert.Equal("Age", provider.Key);
            Assert.Equal(ProviderType.Range, provider.Value.Type);
            Assert.Equal(typeof(double), provider.Value.TType);
            Assert.Equal(20d, ((RangeDoubleProvider)provider.Value).MinValue);
            Assert.Equal(40d, ((RangeDoubleProvider)provider.Value).MaxValue);
        }