Exemple #1
0
        public void ConvertAnonymousToFoo(bool boolValue, float floatValue, int intValue)
        {
            var source = new
            {
                Bool  = boolValue,
                Float = floatValue,
                Int   = intValue
            };

            var foo = _mapper.Map(source);

            foo.Bool.Should().Be(source.Bool);
            foo.Float.Should().Be(source.Float);
            foo.Int.Should().Be(source.Int);
        }
Exemple #2
0
        public long Velo_CompiledMapper()
        {
            long stub = 0;

            for (var i = 0; i < _dataset.Length; i++)
            {
                var element       = _dataset[i];
                var mappingResult = _compiledMapper.Map(element);
                stub += mappingResult.Int;
            }

            return(stub);
        }