示例#1
0
        public void Enums(Sources s)
        {
            var src = new SrcStruct
            {
                Val = s
            };

            var mapper = new Mapper();
            var dest   = mapper.Map <SrcStruct, DestStruct>(src);

            dest.Val.Should().Be((Dests)s);
        }
示例#2
0
        public void EnumToLong(Sources s)
        {
            var src = new SrcStruct
            {
                Val = s
            };

            var mapper = new Mapper();

            mapper.Register <SrcStruct, GenericEntity <long> >().Ignore(x => x.Name);
            var dest = mapper.Map <SrcStruct, GenericEntity <long> >(src);

            dest.Val.Should().Be((long)s);
        }