Exemple #1
0
        public void SortType_Complex()
        {
            var valueTypeConverter = new SampleConverter();

            mapper = new NumericReflectionFieldMapper <Sample>(typeof(Sample).GetProperty("Complex"), StoreMode.Yes, valueTypeConverter, TypeDescriptor.GetConverter(typeof(int)), "Complex", 128, 1.0f);

            Assert.That(mapper.CreateSortField(false).Type, Is.EqualTo(SortField.INT));
        }
        public void SortType_Complex()
        {
            var valueTypeConverter = new SampleConverter();

            mapper = new NumericReflectionFieldMapper<Sample>(typeof(Sample).GetProperty("Complex"), StoreMode.Yes, valueTypeConverter, TypeDescriptor.GetConverter(typeof(int)), "Complex", 128, 1.0f);

            Assert.That(mapper.CreateSortField(false).Type, Is.EqualTo(SortField.INT));
        }
        public void SortType_Long()
        {
            mapper = new NumericReflectionFieldMapper<Sample>(typeof(Sample).GetProperty("Long"), StoreMode.Yes, null, TypeDescriptor.GetConverter(typeof(long)), "Long", NumericUtils.PRECISION_STEP_DEFAULT, 1.0f);

            Assert.That(mapper.CreateSortField(false).Type, Is.EqualTo(SortField.LONG));
        }
        public void SortType_Int()
        {
            mapper = new NumericReflectionFieldMapper<Sample>(typeof(Sample).GetProperty("Int"), StoreMode.Yes, null, TypeDescriptor.GetConverter(typeof(int)), "Int", 128, 1.0f);

            Assert.That(mapper.CreateSortField(false).Type, Is.EqualTo(SortField.INT));
        }
Exemple #5
0
        public void SortType_Int()
        {
            mapper = new NumericReflectionFieldMapper <Sample>(typeof(Sample).GetProperty("Int"), StoreMode.Yes, null, TypeDescriptor.GetConverter(typeof(int)), "Int", 128, 1.0f);

            Assert.That(mapper.CreateSortField(false).Type, Is.EqualTo(SortField.INT));
        }
Exemple #6
0
        public void SortType_Long()
        {
            mapper = new NumericReflectionFieldMapper <Sample>(typeof(Sample).GetProperty("Long"), StoreMode.Yes, null, TypeDescriptor.GetConverter(typeof(long)), "Long", NumericUtils.PRECISION_STEP_DEFAULT, 1.0f);

            Assert.That(mapper.CreateSortField(false).Type, Is.EqualTo(SortField.LONG));
        }