AutoMapper/AutoMapper — Issue #174: Custom type converters Wiki test fails
Author: bcbeatty
Created: 2012-02-27 15:44:35+00:00
State: open

I tried duplicating the wiki page,https://github.com/AutoMapper/AutoMapper/wiki/Custom-type-converters
When I test TypeTypeConverter it fails and contet.SourceType always returns string.

Mapper.CreateMap().ConvertUsing(Convert.ToInt32);
Mapper.CreateMap().ConvertUsing(new DateTimeTypeConverter());
Mapper.CreateMap().ConvertUsing();
Mapper.CreateMap();

var source = new Source
{
Value1 = "5",
Value2 = "01/01/2000",
Value3 = "Test.Framework.AutoMapper+Destination"
};

Destination result = Mapper.Map(source);
Assert.That(result.Value3, Is.EqualTo(typeof(Destination)));// result.Value3.ShouldEqual(typeof(Destination));
------
Expected:
But was: